diff options
| author | Carson Fleming <cflems@cflems.net> | 2026-08-05 01:05:22 -0400 |
|---|---|---|
| committer | Carson Fleming <cflems@cflems.net> | 2026-08-05 01:05:22 -0400 |
| commit | a207a7f39514f03ddfafbe39e52a3fae57a414b4 (patch) | |
| tree | 5f60d98707bf12255f294b3545d8e4f8e6005bca /type_checker.c | |
| parent | c462e3dd752f95adc46c0f2cf97c45c49d9744b4 (diff) | |
| download | ccc-a207a7f39514f03ddfafbe39e52a3fae57a414b4.tar.gz | |
got hello world working with some hacks
Diffstat (limited to 'type_checker.c')
| -rw-r--r-- | type_checker.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/type_checker.c b/type_checker.c index 0aaa584..00f57d0 100644 --- a/type_checker.c +++ b/type_checker.c @@ -281,6 +281,8 @@ static void type_check_group(struct group_node* node) { exit_scope(node->scope); } +/* TODO: type check redefinition arguments against each other */ +/* TODO: wire the body to the definition either here or in the parser */ static void type_check_fn_decl(struct fn_decl_node* node) { enter_scope(node->scope); @@ -289,7 +291,7 @@ static void type_check_fn_decl(struct fn_decl_node* node) { arg_decl = arg_decl->next) arg_decl->def_ref->type = &arg_decl->type; - type_check_group(&node->body); + if (node->body != NULL) type_check_group(node->body); exit_scope(node->scope); } |
