diff --git a/src/parser.rs b/src/parser.rs index e917093..62cd976 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -457,7 +457,7 @@ impl Parser { } fn is_eof(&self) -> bool { - self.lexer.is_eof() + self.current.kind == TokenKind::Eof } pub fn was_error(&self) -> bool {