From 5d5c14920a9aa3397d4b479c22e37392be5557f4 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Tue, 13 Oct 2026 08:47:52 +0000 Subject: feat: support comma-separated OUTPUT expressions Co-Authored-By: Claude Fable 5.1 --- lib/Parser/Parser.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/Parser/Parser.cc') diff --git a/lib/Parser/Parser.cc b/lib/Parser/Parser.cc index 260472c..25fc342 100644 --- a/lib/Parser/Parser.cc +++ b/lib/Parser/Parser.cc @@ -555,9 +555,15 @@ std::unique_ptr Parser::ParseStatementImpl() { } else if (CurTok == tok_output) { getNextToken(); - auto Expr = ParseExpression(); - if (!Expr) return nullptr; - return std::make_unique(std::move(Expr)); + std::vector> Exprs; + while (true) { + auto Expr = ParseExpression(); + if (!Expr) return nullptr; + Exprs.push_back(std::move(Expr)); + if (CurTok != ',') break; + getNextToken(); + } + return std::make_unique(std::move(Exprs)); } else if (CurTok == tok_if) { return ParseIfStmt(); -- cgit v1.3.1-4-g156e