summaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
authorCarson Fleming <cflems@cflems.net>2026-07-18 23:38:59 -0700
committerCarson Fleming <cflems@cflems.net>2026-07-18 23:38:59 -0700
commit1e712cf04567c48100526f9a3a0f796497168268 (patch)
tree28a1676d36620500578d1a386d8d0b976637ce9f /ast.h
parentfeb1cac139ca5aa2ba76ac6a0a318bced03d8638 (diff)
downloadccc-1e712cf04567c48100526f9a3a0f796497168268.tar.gz
type system surely
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/ast.h b/ast.h
index 71c400c..bc23a1c 100644
--- a/ast.h
+++ b/ast.h
@@ -7,8 +7,7 @@ struct stmt_node;
struct expr_node;
struct type_ref_node {
- unsigned char ptr_level;
- const struct type_def* def_ref;
+ struct type type;
};
struct int_lit_node {
@@ -126,6 +125,8 @@ struct fn_decl_node {
struct args_decl_node* args;
struct group_node body;
struct scope* scope;
+
+ const struct type_def* resolved_return_type;
};
struct return_node {
@@ -189,7 +190,7 @@ struct ast {
const struct type_def* char_type;
const struct type_def* integral_type;
const struct type_def* decimal_type;
- const struct type_def* string_type;
+ const struct type_def* pointer_type;
};
void ast_destroy(struct ast* ast);