Skip to content

Commit

Permalink
Optional 'DO' keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
SingularityT3 committed Feb 22, 2023
1 parent accced6 commit 561df7c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/parser/loopParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ Node *Parser::parseWhileLoop() {
Node *condition = parseEvaluationExpression();

if (currentToken->type == TokenType::LINE_END) advance();
if (currentToken->type != TokenType::DO)
throw PSC::ExpectedTokenError(*currentToken, "'DO'");
advance();
if (currentToken->type == TokenType::DO) advance();

PSC::Block *block = parseBlock();

Expand Down

0 comments on commit 561df7c

Please sign in to comment.