Function rustc_expand::mbe::macro_check::check_binders
source · [−]fn check_binders(
sess: &ParseSess,
node_id: NodeId,
lhs: &TokenTree,
macros: &Stack<'_, MacroState<'_>>,
binders: &mut FxHashMap<MacroRulesNormalizedIdent, BinderInfo>,
ops: &Stack<'_, KleeneToken>,
valid: &mut bool
)
Expand description
Checks lhs
as part of the LHS of a macro definition, extends binders
with new binders, and
sets valid
to false in case of errors.
Arguments:
sess
is used to emit diagnostics and lintsnode_id
is used to emit lintslhs
is checked as part of a LHSmacros
is the stack of possible outer macrosbinders
contains the binders of the LHSops
is the stack of Kleene operators from the LHSvalid
is set in case of errors