-
Notifications
You must be signed in to change notification settings - Fork 14k
Closed
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-syntaxextArea: Syntax extensionsArea: Syntax extensions
Description
Because of #3232, the macro parser can't match syntax of the form $($x:some_nt)* under any circumstances. However, this is the natural way to deal with token trees, and adding a delimiter of some kind is prohibitively unergonomic.
As a short-term fix, we could special-case tt so that the macro parser doesn't farm it out to the main Rust parser. We could also introduce a ttseq or something to mean "zero or more tts". It's conceivable that we could also try being smarter with lookahead, but I don't think that's going to be fruitful.
Metadata
Metadata
Assignees
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-syntaxextArea: Syntax extensionsArea: Syntax extensions