Skip to content

Commit

Permalink
Revert optional EOS in VariableStatement
Browse files Browse the repository at this point in the history
  • Loading branch information
arnav-ag committed Mar 31, 2024
1 parent 3dbd81d commit 57e5b2c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/parser/ooga.js
Original file line number Diff line number Diff line change
Expand Up @@ -5373,11 +5373,13 @@ function peg$parse(input, options) {
s6 = null;
}
s7 = peg$parseEOS();
if (s7 === peg$FAILED) {
s7 = null;
if (s7 !== peg$FAILED) {
peg$savedPos = s0;
s0 = peg$f63(s3, s5, s6);
} else {
peg$currPos = s0;
s0 = peg$FAILED;
}
peg$savedPos = s0;
s0 = peg$f63(s3, s5, s6);
} else {
peg$currPos = s0;
s0 = peg$FAILED;
Expand Down
2 changes: 1 addition & 1 deletion src/parser/ooga.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ SequenceStatement
}

VariableStatement
= VarToken __ id:Identifier __ type:(InitType)? init:(__ Initialiser)? EOS? {
= VarToken __ id:Identifier __ type:(InitType)? init:(__ Initialiser)? EOS {
return {
tag: "VariableDeclaration",
id: id,
Expand Down

0 comments on commit 57e5b2c

Please sign in to comment.