You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rework RESERVED_RAW_IDENTIFIER and RESERVED_RAW_LIFETIME
This reworks the reserved raw identifier and lifetimes to hopefully more
clearly express what they mean.
The "except" clauses in the raw identifier were intended to mean a set
subtraction, not an explicit "and it is an error if it is specified".
Using set subtraction isn't correct because that would mean `r#crate`
would be interpreted as 3 tokens (since RAW_IDENTIFIER did not match it,
but IDENTIFIER_OR_KEYWORD PUNCTUATION IDENTIFIER_OR_KEYWORD would).
I also reordered Token, since the intent is that the first production
in an alternation that matches wins. The idea here is to make the
reserved tokens high priority, so that they clearly match first and
cause an error. (I did not exhaustively analyze the rest of the rules
to see if they follow that behavior, that is for another day.)
It could be said it would be nice to document the rationale for the
restrictions (#2042), but
that is a bigger ask.
0 commit comments