parser: skip newline tokens during expression parsing
This commit is contained in:
parent
ef10784998
commit
3e1003ba94
1 changed files with 4 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue