Trait rustc_expand::mbe::macro_rules::Tracker
source · pub(super) trait Tracker<'matcher> {
fn before_match_loc(
&mut self,
parser: &TtParser,
matcher: &'matcher MatcherLoc
);
fn after_arm(
&mut self,
result: &ParseResult<FxHashMap<MacroRulesNormalizedIdent, NamedMatch>>
);
fn description() -> &'static str;
fn recovery() -> Recovery;
}
Required Methods§
sourcefn before_match_loc(&mut self, parser: &TtParser, matcher: &'matcher MatcherLoc)
fn before_match_loc(&mut self, parser: &TtParser, matcher: &'matcher MatcherLoc)
This is called before trying to match next MatcherLoc on the current token.
sourcefn after_arm(
&mut self,
result: &ParseResult<FxHashMap<MacroRulesNormalizedIdent, NamedMatch>>
)
fn after_arm(
&mut self,
result: &ParseResult<FxHashMap<MacroRulesNormalizedIdent, NamedMatch>>
)
This is called after an arm has been parsed, either successfully or unsuccessfully. When this is called,
before_match_loc
was called at least once (with a MatcherLoc::Eof
).
sourcefn description() -> &'static str
fn description() -> &'static str
For tracing.