diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-11-19 18:41:55 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-11-19 18:41:55 +0200 |
| commit | 8f754f8b13e55e4bb92d72f105c5aaaba1754b7d (patch) | |
| tree | b70b813c091691d6645f8cb82295f41f24f3be93 /src/debug.c | |
| parent | 5304dbcf4df1fc211b5099f4d6eb7f23dfa8c454 (diff) | |
| download | ek-8f754f8b13e55e4bb92d72f105c5aaaba1754b7d.tar.gz ek-8f754f8b13e55e4bb92d72f105c5aaaba1754b7d.zip | |
start working on instruction lowering
Diffstat (limited to 'src/debug.c')
| -rw-r--r-- | src/debug.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/debug.c b/src/debug.c index e6e2b60..b110b9b 100644 --- a/src/debug.c +++ b/src/debug.c @@ -192,9 +192,10 @@ static void _type_str(FILE *fp, struct ast_node *type) assert(type->node_type == AST_TYPE); - switch (type->_type.kind) { + switch (AST_TYPE(type).kind) { case AST_TYPE_POINTER: - fputc('\'', fp); + fputc('*', fp); + _type_str(fp, AST_PTR_TYPE(type).base); break; case AST_TYPE_ID: { @@ -238,7 +239,7 @@ static void _type_str(FILE *fp, struct ast_node *type) fprintf(fp, "NOT YET IMPLEMENTED"); } - _type_str(fp, type->_type.next); + _type_str(fp, AST_TYPE(type).next); } char *type_str(struct ast_node *node) |
