chore: add comment regarding grammar for comma op

This commit is contained in:
Seymur Bagirov 2025-01-03 03:27:30 +04:00
parent 4fd04e8fd3
commit 8338c360e0

View File

@ -28,6 +28,7 @@ impl Parser<'_> {
} }
// Challenge #1. We're writing comma before equality, because it has the lowest precedence // Challenge #1. We're writing comma before equality, because it has the lowest precedence
// comma -> equality ((,) equality)* ; // expression grammar
fn comma(&mut self) -> Result<Expr, ParseError> { fn comma(&mut self) -> Result<Expr, ParseError> {
use TokenType::*; use TokenType::*;
self.left_association_binary(&[Comma], Parser::equality) self.left_association_binary(&[Comma], Parser::equality)