Skip to content

Commit

Permalink
Use EOS in channel write statements
Browse files Browse the repository at this point in the history
  • Loading branch information
arnav-ag committed Apr 10, 2024
1 parent 13400d2 commit 362a996
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/parser/ooga.js
Original file line number Diff line number Diff line change
Expand Up @@ -8209,7 +8209,7 @@ function peg$parse(input, options) {
}

function peg$parseChannelWriteExpression() {
var s0, s1, s2, s3, s4, s5;
var s0, s1, s2, s3, s4, s5, s6;

s0 = peg$currPos;
s1 = peg$parseExpression();
Expand All @@ -8226,8 +8226,14 @@ function peg$parse(input, options) {
s4 = peg$parse__();
s5 = peg$parseExpression();
if (s5 !== peg$FAILED) {
peg$savedPos = s0;
s0 = peg$f114(s1, s5);
s6 = peg$parseEOS();
if (s6 !== peg$FAILED) {
peg$savedPos = s0;
s0 = peg$f114(s1, s5);
} else {
peg$currPos = s0;
s0 = peg$FAILED;
}
} 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 @@ -1086,7 +1086,7 @@ ChannelReadExpression


ChannelWriteExpression
= channel:Expression __ "<-" __ value:Expression {
= channel:Expression __ "<-" __ value:Expression EOS {
return {
tag: "ChannelWriteExpression",
channel: channel,
Expand Down

0 comments on commit 362a996

Please sign in to comment.