From a07b22097f3758558f4b35aa5aa5d8c1afc3402b Mon Sep 17 00:00:00 2001 From: hachem Date: Sun, 30 Aug 2026 16:09:03 +0200 Subject: add: parse call statements --- src/parser/ast.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/parser/ast.h') diff --git a/src/parser/ast.h b/src/parser/ast.h index e85e72f..3fa80da 100644 --- a/src/parser/ast.h +++ b/src/parser/ast.h @@ -66,6 +66,7 @@ enum StatementKind STATEMENT_GOTO, STATEMENT_SYSCALL, STATEMENT_IF, + STATEMENT_CALL, }; struct AssignStatement @@ -94,6 +95,14 @@ struct IfStatement struct Statement* body; }; +struct CallStatement +{ + struct Token name; + struct Expr** args; + size_t arg_count; + size_t arg_capacity; +}; + struct Statement { enum StatementKind kind; @@ -103,6 +112,7 @@ struct Statement struct LabelStatement label; struct GotoStatement jump; struct IfStatement branch; + struct CallStatement call; }; }; -- cgit v1.3