Skip to content

Commit

Permalink
Corrected One Statement Compound's parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Calamity210 committed Sep 7, 2020
1 parent da271c4 commit c9f3e78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 6 additions & 1 deletion examples/control_flow.birb
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,9 @@ year += 1;
}

assert(year == 2030);
screm(year); // output 2030
screm(year); // output 2030

if (true)
screm('Single Statement Compound'); // output Single Statement Compound

screm('just testing'); // output just testing
1 change: 0 additions & 1 deletion lib/parser/parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ ASTNode parseOneStatementCompound(Parser parser, Scope scope) {
compound.scope = scope;

var statement = parseStatement(parser, scope);
eat(parser, TokenType.TOKEN_SEMI);
compound.compoundValue.add(statement);

return compound;
Expand Down

0 comments on commit c9f3e78

Please sign in to comment.