fn bump_with(&mut self, next_token: Token) {
        // Bumping after EOF is a bad sign, usually an infinite loop.
        if self.prev_token.kind == TokenKind::Eof {
            let msg = "attempted to bump the parser past EOF (may be stuck in a loop)";
            self.span_bug(self.token.span, msg);
        }

        // Update the current and previous tokens.
        self.prev_token = mem::replace(&mut self.token, next_token);

        // Diagnostics.
        self.expected_tokens.clear();
    }
/// Advance the parser by one token using provided token as the next one.
Advance the parser by one token using provided token as the next one.
Advance the parser by one token using provided token as the next one .
fn bump_with(&mut self, next_token: Token) {
        // Bumping after EOF is a bad sign, usually an infinite loop.
        if self.prev_token.kind == TokenKind::Eof {
            let msg = "attempted to bump the parser past EOF (may be stuck in a loop)";
            self.span_bug(self.token.span, msg);
        }
        // Update the current and previous tokens.
        self.prev_token = mem::replace(&mut self.token, next_token);
        // Diagnostics.
        self.expected_tokens.clear();
    }
fn bump_with ( & mut self , next_token : Token ) { // Bumping after EOF is a bad sign, usually an infinite loop. if self . prev_token . kind == TokenKind :: Eof { let msg = " " ; self . span_bug ( self . token . span , msg ) ; } // Update the current and previous tokens. self . prev_token = mem :: replace ( & mut self . token , next_token ) ; // Diagnostics. self . expected_tokens . clear ( ) ; }
Advance the parser by one token using provided token as the next one.
Advance the parser by one token using provided token as the next one .
&mut self
next_token
Token
&mut self
next_token
Token