Skip to content

Commit

Permalink
replace eat by expect for curly in block
Browse files Browse the repository at this point in the history
  • Loading branch information
NTTVy03 committed Jan 1, 2025
1 parent db81682 commit e61edb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/parser/src/grammar/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub fn block(p: &mut Parser) {
p.advance_with_error("Miss {");
} else {
let m = p.open();
p.eat(LCurly);
p.expect(LCurly);
let stmt_marker = p.open();
while !p.at(RCurly) && !p.eof() {
let kind = p.current();
Expand All @@ -38,7 +38,7 @@ pub fn block(p: &mut Parser) {

p.close(stmt_marker, StatementList);

p.eat(RCurly);
p.expect(RCurly);

p.close(m, Block);

Expand Down

0 comments on commit e61edb2

Please sign in to comment.