summaryrefslogtreecommitdiff
path: root/include/parser/ast.h
diff options
context:
space:
mode:
authorQuinn Stephens <quinn@osmora.org>2025-06-10 16:49:58 -0400
committerQuinn Stephens <quinn@osmora.org>2025-06-10 16:49:58 -0400
commitcbb0ce85de8f5b8fe282e613bfabb65186ea5b53 (patch)
treec2acb7dd1bb3371989de28e8fbeb434537fbd70f /include/parser/ast.h
parent047f76389fc9a130fde5393fcc7d5d8b76882f83 (diff)
parser: Parse parameter declarationsHEADmain
Signed-off-by: Quinn Stephens <quinn@osmora.org>
Diffstat (limited to 'include/parser/ast.h')
-rw-r--r--include/parser/ast.h8
1 files changed, 6 insertions, 2 deletions
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 */