aboutsummaryrefslogtreecommitdiff
path: root/src/debug.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-11-19 18:41:55 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2023-11-19 18:41:55 +0200
commit8f754f8b13e55e4bb92d72f105c5aaaba1754b7d (patch)
treeb70b813c091691d6645f8cb82295f41f24f3be93 /src/debug.c
parent5304dbcf4df1fc211b5099f4d6eb7f23dfa8c454 (diff)
downloadek-8f754f8b13e55e4bb92d72f105c5aaaba1754b7d.tar.gz
ek-8f754f8b13e55e4bb92d72f105c5aaaba1754b7d.zip
start working on instruction lowering
Diffstat (limited to 'src/debug.c')
-rw-r--r--src/debug.c7
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)