From 43451328a5ae74ffa34356259ee02e3786f070c3 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sat, 17 Oct 2026 06:10:05 +0000 Subject: fix(parser): accept optional DO after WHILE condition Co-Authored-By: Claude Opus 5.5 --- lib/Parser/ParserControlFlow.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') 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 Parser::ParseWhileStmt() { auto Cond = ParseExpression(); if (!Cond) return nullptr; + if (CurTok == tok_identifier && Lex.IdentifierStr == "DO") getNextToken(); + std::vector> Body = ParseBlock({tok_endwhile}); if (CurTok != tok_endwhile) { -- cgit v1.3.1-4-g156e