aboutsummaryrefslogtreecommitdiff
path: root/lib/Parser/Parser.cc
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-17 05:27:14 +0000
committer_ov4 <ov4@ov4.org>2026-10-17 05:27:14 +0000
commite782898e420c7f2abd83b97c160194d0e70598dd (patch)
treef1d95ee7b2766ac2f443df0cb6d5ba419085649e /lib/Parser/Parser.cc
parent42c1649264153940de143741337c38042c32e60b (diff)
feat(calls): support standalone calls and void pointer casts
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'lib/Parser/Parser.cc')
-rw-r--r--lib/Parser/Parser.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Parser/Parser.cc b/lib/Parser/Parser.cc
index d4d04d2..36b0a6a 100644
--- a/lib/Parser/Parser.cc
+++ b/lib/Parser/Parser.cc
@@ -221,6 +221,13 @@ std::unique_ptr<StmtAST> Parser::ParseAssignStmt() {
int Line = Lex.getLine();
getNextToken();
+ if (CurTok == '(') {
+ getNextToken();
+ auto Args = ParseExprList(')', true);
+ if (!Args) return nullptr;
+ return std::make_unique<CallStmtAST>(Name, std::move(*Args), Line);
+ }
+
std::vector<DesignatorAccess> Accesses;
if (!ParseDesignatorSuffix(Accesses)) return nullptr;