parser: skip newline tokens during expression parsing

This commit is contained in:
raf 2025-06-02 11:31:16 +03:00
commit 3e1003ba94
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF

View file

@ -466,6 +466,10 @@ impl Parser {
// Check for operators
while let Some(token) = self.peek() {
if matches!(token.kind, TokenKind::Newline) {
self.advance();
continue;
}
// Check for comparison operators
let operator = match &token.kind {
TokenKind::Eq => BinaryOperator::Eq,