-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Allow multi-statement macros #10681
Copy link
Copy link
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
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
Type
Fields
Give feedbackNo fields configured for issues without a type.
Macros can now expand to multiple items, but not multiple statements. This is a bit sad, especially since a macro that can expand in a module can't expand in a function. This will probably require a bit of restructuring in the parser, since there doesn't seem to be a good way to parse a series of expressions.
parser::parse_block_tailis almost right, but would need to be pulled apart a bit.