Used solely by the count
meta-variable expression, counts the outermost repetitions at a
given optional nested depth.
Extracts an metavariable symbol that can be an identifier, a token tree or a literal.
Given a tree
, make sure that all sequences have the same length as the matches for the
appropriate meta-vars in interpolations
.
Lookup the meta-var named ident
and return the matched token tree from the invocation using
the set of matches interpolations
.
Returns a
NamedMatch
item declared on the LHS given an arbitrary
IdentStore the metavariable span for this original span into a side table.
FIXME: Try to put the metavariable span into SpanData
instead of a side table (#118517).
An optimal encoding for inlined spans will need to be selected to minimize regressions.
The side table approach is relatively good, but not perfect due to collisions.
In particular, collisions happen when token is passed as an argument through several macro
calls, like in recursive macros.
The old heuristic below is used to improve spans in case of collisions, but diagnostics are
still degraded sometimes in those cases.
Used by meta-variable expressions when an user input is out of the actual declared bounds. For
example, index(999999) in an repetition of only three elements.
This can do Macro-By-Example transcription.