From 8f754f8b13e55e4bb92d72f105c5aaaba1754b7d Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 19 Nov 2023 18:41:55 +0200 Subject: start working on instruction lowering --- src/debug.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/debug.c') 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) -- cgit v1.3