Skip to content

ctxts on macro invocations won't work in some places #8063

Closed
@jbclements

Description

@jbclements

The current scheme of attaching contexts to macro invocations won't work correctly when that macro invocation is inside of another macro definition, because that definition will be represented only as token trees, and the macro invocation won't accumulate context correctly.

There are a couple of possible fixes for this. One would be to back out the existing scheme and just use the context associated with the macro invocation identifier--that is, the 'foo' in an invocation foo!(3,4,5). A better way of doing it--if it's not too expensive--would be to add a context to every tt_delim, and then transfer it correctly to a tt_delim that parses into a macro invocation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)A-syntaxextArea: Syntax extensions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions