Skip to content

Commit 561df7c

Browse files
committed
Optional 'DO' keyword
1 parent accced6 commit 561df7c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/parser/loopParser.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ Node *Parser::parseWhileLoop() {
6868
Node *condition = parseEvaluationExpression();
6969

7070
if (currentToken->type == TokenType::LINE_END) advance();
71-
if (currentToken->type != TokenType::DO)
72-
throw PSC::ExpectedTokenError(*currentToken, "'DO'");
73-
advance();
71+
if (currentToken->type == TokenType::DO) advance();
7472

7573
PSC::Block *block = parseBlock();
7674

0 commit comments

Comments
 (0)