fn check_nested_macro(
psess: &ParseSess,
node_id: NodeId,
macro_rules: bool,
tts: &[TokenTree],
macros: &Stack<'_, MacroState<'_>>,
guar: &mut Option<ErrorGuaranteed>,
) -> usizeExpand description
Checks the body of nested macro, returns where the check stopped.
The token trees are checked as long as they look like a list of (LHS) => {RHS} token trees. This
check is a best-effort to detect a macro definition. It returns the position in tts where we
stopped checking because we detected we were not in a macro definition anymore.
Arguments:
psessis used to emit diagnostics and lintsnode_idis used to emit lintsmacro_rulesspecifies whether the macro ismacro_rulesttsis checked as a list of (LHS) => {RHS}macrosis the stack of outer macrosguaris set in case of errors