An accumulator over a TokenTree to be used with fold. During transcription, we need to make
sure that the size of each sequence and all of its nested sequences are the same as the sizes
of all the matched (nested) sequences in the macro invocation. If they don’t match, somebody
has made a mistake (either the macro writer or caller).
Store 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.