From cbb0ce85de8f5b8fe282e613bfabb65186ea5b53 Mon Sep 17 00:00:00 2001 From: Quinn Stephens Date: Tue, 10 Jun 2025 16:49:58 -0400 Subject: parser: Parse parameter declarations Signed-off-by: Quinn Stephens --- include/parser/ast.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/parser') diff --git a/include/parser/ast.h b/include/parser/ast.h index d4baf92..e8052c6 100644 --- a/include/parser/ast.h +++ b/include/parser/ast.h @@ -38,7 +38,8 @@ enum ast_node_kind { NOK_UNKNOWN, NOK_FUNCTION, - NOK_VARIABLE + NOK_VARIABLE, + NOK_PARAMETER }; struct ast_node { @@ -46,11 +47,14 @@ struct ast_node { enum ast_node_kind kind; + /* Function, variable, parameter */ const char *name; size_t name_len; - struct type *type; int ptr_levels; + + /* Function */ + struct hashmap params; }; #endif /* !_PARSER_AST_H */ -- cgit v1.2.3