From 71b10c1c765196a771ce05216395d6b78892a735 Mon Sep 17 00:00:00 2001 From: Quinn Stephens Date: Sun, 3 Nov 2024 16:53:16 -0500 Subject: [compiler] More small refactoring Signed-off-by: Quinn Stephens --- compiler/main.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'compiler/main.c') diff --git a/compiler/main.c b/compiler/main.c index ada6243..3666859 100644 --- a/compiler/main.c +++ b/compiler/main.c @@ -184,7 +184,7 @@ print_ptrs(int n_ptrs) static void print_alias(struct type *typ) { - printf("alias (%lu bytes, %d pointer(s))", typ->size, typ->n_ptrs); + printf("alias (%lu bytes, %d pointer(s));\n", typ->size, typ->n_ptrs); } static void @@ -207,7 +207,7 @@ print_enum(struct type *typ) } while (mem != (struct enum_member*)&typ->members.rows[r]); } - printf("}"); + printf("}\n"); } static void @@ -232,7 +232,7 @@ print_struct(struct type *typ) } while (mem != (struct struct_member*)&typ->members.rows[r]); } - printf("}"); + printf("}\n"); } static void @@ -251,12 +251,9 @@ print_type(struct type *typ) print_struct(typ); break; default: - printf("(unknown)"); + printf("(unknown);\n"); break; } - - printf(";\n"); - } int -- cgit v1.2.3