diff options
| author | Carson Fleming <cflems@cflems.net> | 2026-07-17 12:40:59 -0700 |
|---|---|---|
| committer | Carson Fleming <cflems@cflems.net> | 2026-07-17 12:40:59 -0700 |
| commit | 424be65858999a894a18e1972fa9649fbc4c1df8 (patch) | |
| tree | a878fe623546a2e3fcaf204d5977991995b21c3c /ast.h | |
| parent | 155d1971b7cd56d3206808c36c6b40357bc31cbb (diff) | |
| download | ccc-424be65858999a894a18e1972fa9649fbc4c1df8.tar.gz | |
improve type system sorta
Diffstat (limited to 'ast.h')
| -rw-r--r-- | ast.h | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -6,12 +6,9 @@ struct stmt_node; struct expr_node; -struct type_node { - bool is_unsigned; - bool is_short; - bool is_long; +struct type_ref_node { unsigned char ptr_level; - struct type_def* def; + const struct type_def* def_ref; }; struct int_lit_node { @@ -35,8 +32,8 @@ struct var_ref_node { }; struct var_decl_node { - struct type_node type; - char* ident; + struct type_ref_node type; + struct var_def* def_ref; }; struct lval_node { @@ -108,10 +105,7 @@ struct expr_node { struct binary_node binary; } inner; - struct { - bool is_signed; - unsigned long long sz; - } evaluated_type; + const struct type_def* resolved_type; }; struct group_node { @@ -125,7 +119,7 @@ struct args_decl_node { }; struct fn_decl_node { - struct type_node return_type; + struct type_ref_node return_type; char* name; struct args_decl_node* args; struct group_node body; |
