aboutsummaryrefslogtreecommitdiff
path: root/lib/Parser/ParserControlFlow.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Parser/ParserControlFlow.cc')
-rw-r--r--lib/Parser/ParserControlFlow.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Parser/ParserControlFlow.cc b/lib/Parser/ParserControlFlow.cc
index afa8bd8..1cbedcd 100644
--- a/lib/Parser/ParserControlFlow.cc
+++ b/lib/Parser/ParserControlFlow.cc
@@ -54,6 +54,8 @@ std::unique_ptr<StmtAST> Parser::ParseWhileStmt() {
auto Cond = ParseExpression();
if (!Cond) return nullptr;
+ if (CurTok == tok_identifier && Lex.IdentifierStr == "DO") getNextToken();
+
std::vector<std::unique_ptr<StmtAST>> Body = ParseBlock({tok_endwhile});
if (CurTok != tok_endwhile) {