diff --git a/src/parser/loopParser.cpp b/src/parser/loopParser.cpp index 1b3aa47..3df2006 100644 --- a/src/parser/loopParser.cpp +++ b/src/parser/loopParser.cpp @@ -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();