Closed jsgf closed 1 year ago
Hey @jsgf! Chiming in to say I'd love this as well, I find myself repeating the same thing a lot.
I think I would prefer not to support this in this crate. But anybody else should feel free to experiment with a more fully featured crate that can do this kind of thing.
I have some uses of
paste
where the same set of token pastes are repeated a few times. For example, within a macro_rules:It would be nice to have a mechanism to locally define a symbol representing the
[<$name:camel Struct>]
token pasting expression. I could add a new layer of macro expansion to capture that expression, but that doesn't feel like a great solution.Is there some other existing idiom for this?
If not, then as a total straw-man suggestion for syntax, maybe something like: