Checks that the lhs contains no repetition which could match an empty token tree, because then the matcher would hang indefinitely.
Converts a macro item into a syntax extension.
Expands the rules based macro defined by
rhses for a given
true if a fragment of type
frag can be followed by any sort of
token. We use this (among other things) as a useful approximation
frag can be followed by a repetition like
$(...)+. In general, these can be a bit tricky to reason about,
so we adopt a conservative position that says that any fragment
specifier which consumes at most one token tree can be followed by
a fragment specifier (indeed, these fragments can be followed by
ANYTHING without fear of future compatibility hazards).
frag can legally be followed by the token
fragments that can consume an unbounded number of tokens,
must be within a well-defined follow set. This is intended to
guarantee future compatibility: for example, without this rule, if
expr to include a new binary operator, we might
break macros that were relying on that binary operator as a
Generates an appropriate parsing failure message. For EOF, this is “unexpected end…”. For other tokens, this is “unexpected token…”.