diff options
| author | Carson Fleming <cflems@cflems.net> | 2026-08-06 00:24:49 -0400 |
|---|---|---|
| committer | Carson Fleming <cflems@cflems.net> | 2026-08-06 00:24:49 -0400 |
| commit | b48e27f5cc31af65d8bb92d4b81cd03a60c5bcdb (patch) | |
| tree | 0901fba9ff451968d758ed47b57ff99d1330fb8a /ast.h | |
| parent | a207a7f39514f03ddfafbe39e52a3fae57a414b4 (diff) | |
| download | ccc-b48e27f5cc31af65d8bb92d4b81cd03a60c5bcdb.tar.gz | |
clean up yesterday's hacks + functions in type system
Diffstat (limited to 'ast.h')
| -rw-r--r-- | ast.h | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -31,7 +31,7 @@ struct str_lit_node { }; struct var_ref_node { - struct var_def* def_ref; + const struct var_def* def_ref; }; struct decl_node { @@ -51,8 +51,7 @@ struct assign_node { }; struct call_node { - /* TODO: function pointers */ - struct fn_decl_node* fn_ref; /* borrowed */ + struct expr_node* expr; struct expr_list_node* args; }; @@ -126,15 +125,15 @@ struct arg_decl_node { }; struct fn_decl_node { - struct type return_type; - const char* name; + struct type type; + char* name; /* TODO: why is this borrowed? who owns it? */ struct arg_decl_node* args; struct group_node* body; struct scope* scope; }; struct return_node { - struct fn_decl_node* fn_ref; + struct var_def* fn_def; struct expr_list_node* ret_val; /* null to return void */ }; |
