pub(super) trait Tracker<'matcher> {
    type Failure;

    fn build_failure(
        tok: Token,
        position: usize,
        msg: &'static str
    ) -> Self::Failure; fn description() -> &'static str; fn before_match_loc(
        &mut self,
        _parser: &TtParser,
        _matcher: &'matcher MatcherLoc
    ) { ... } fn after_arm(
        &mut self,
        _result: &ParseResult<FxHashMap<MacroRulesNormalizedIdent, NamedMatch>, Self::Failure>
    ) { ... } fn recovery() -> Recovery { ... } }

Required Associated Types§

The contents of ParseResult::Failure.

Required Methods§

Arm failed to match. If the token is token::Eof, it indicates an unexpected end of macro invocation. Otherwise, it indicates that no rules expected the given token. The usize is the approximate position of the token in the input token stream.

For tracing.

Provided Methods§

This is called before trying to match next MatcherLoc on the current token.

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).

Implementors§