So yeah, macro_rules! repetitions were designed to favor "zipping" over "flat_mapping" / combining / performing the cartesian product, even in cases where there would be no ambiguity. So, sadly, you can't directly combine those together. The simpler solution here would be to, as @Helioza suggested, use $:tt to capture the whole { $($:tt)* }, at which point you "just" have to tackle the ambiguity (w.r.t. that $:tt potentially being part of a $:ty), which Helioza tackled with |.

For the sake of generality, here is how you'd solve the pattern without changing your input syntax.

Use recursion instead of repetition for one of these two repetitions. That way, for each step of the recursion, there won't be a repetition for that element, allowing you to combine them:

This can be quite nice for simple situations such as this one, where one of the sequences / repetitions is small.

There is a more general technique, which generalizes quite well to more-than-2 sequences/repetitions, and which can be more performant if all the repetitions are big. It's kind of overkill for this situation, though, but I'll try to show it nonetheless for the sake of the example:

A nifty trick for this pattern is to (ab)use the fact that high level captures such as :ty or :expr, when emitted, are already wrapped within "invisible parenthesis" which allows them to be parsed, afterwards, as one simple :tt each.