Skip to content

Allow multi-statement macros #10681

Closed
Closed
@sfackler

Description

@sfackler

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_tail is almost right, but would need to be pulled apart a bit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-syntaxextArea: Syntax extensions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions