-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-syntaxextArea: Syntax extensionsArea: Syntax extensionsI-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.P-lowLow priorityLow priority
Description
In a case like this:
m!{ 4 + m!{ 2+ 3 } }
...the body of the innermost invocation gets parsed as a token tree n times, where n is the nesting depth of the macros.
What should happen is the parser should tell the lexer "I'm looking for a token tree; you don't happen to be operating on a token tree already by any chance?". string_reader
s will say "No", and tt_readers will say "Why yes; here's the whole next subtree." In parse.rs, parse_token_tree
will use this information similarly to the way that the the maybe_whole!
macro works.
Metadata
Metadata
Assignees
Labels
A-syntaxextArea: Syntax extensionsArea: Syntax extensionsI-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.P-lowLow priorityLow priority