Skip to content

Commit

Permalink
fixes infix parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
tenmajkl committed Sep 6, 2023
1 parent ae62b2e commit adf96f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ public function parse(TokenKind $end = null): Group
$node->right = $this->parseFragment();
$stack->push($node);
$this->stream->next();
continue;
if ($this->stream->curent()?->kind === $end) {
break;
}
}
$stack->push($this->parseFragment());
$this->stream->next();
Expand Down

0 comments on commit adf96f4

Please sign in to comment.