fn expect_peek(&mut self, token: Token) -> ParseResult<()> {
        if self.peek_token_is(&token) {
            self.next_token()?;
            Ok(())
        } else {
            Err(ParseError::Expected(
                token.to_string(),
                self.peek_token.clone(),
            ))
        }
    }
/// Expect the next (peek) token to match the given token
Expect the next (peek) token to match the given token
Expect the next ( peek ) token to match the given token
fn expect_peek(&mut self, token: Token) -> ParseResult<()> {
        if self.peek_token_is(&token) {
            self.next_token()?;
            Ok(())
        } else {
            Err(ParseError::Expected(
                token.to_string(),
                self.peek_token.clone(),
            ))
        }
    }
fn expect_peek ( & mut self , token : Token ) -> ParseResult < ( ) > { if self . peek_token_is ( & token ) { self . next_token ( ) ? ; Ok ( ( ) ) } else { Err ( ParseError :: Expected ( token . to_string ( ) , self . peek_token . clone ( ) , ) ) } }
Expect the next (peek) token to match the given token
Expect the next ( peek ) token to match the given token
&mut self
token
Token