From 556aafa5eb681f5500169268d3cdea82a298c2af Mon Sep 17 00:00:00 2001 From: Mel Date: Tue, 19 May 2026 20:47:51 +0200 Subject: Add IR constructors Signed-off-by: Mel --- boot/transpile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'boot/transpile.c') diff --git a/boot/transpile.c b/boot/transpile.c index 7264085..9d910b3 100644 --- a/boot/transpile.c +++ b/boot/transpile.c @@ -205,7 +205,7 @@ transpile_visit_type_definition_alias(struct Visit* visit, struct Type* type) // aliases map to typedefs // TODO: maybe aliases are too much sugar for the lowered representation, // technically any reference to an alias could directly map to the underlying type. - struct Type_Ref bare = { .type_id = type->value.alias.target_id, .mods = { 0 } }; + struct Type_Ref bare = type_ref_bare(type->value.alias.target_id); TRANSPILE_WRITE("typedef "); VISIT(visit_type_ref, &bare); TRANSPILE_WRITE(" %s;\n", string_c_str(type->name)); @@ -484,7 +484,7 @@ transpile_visit_expression_construct(struct Visit* visit, struct Expression* exp { TRANSPILE_PREAMBLE - struct Type_Ref bare = { .type_id = expression->value.construct.type_id, .mods = { 0 } }; + struct Type_Ref bare = type_ref_bare(expression->value.construct.type_id); TRANSPILE_WRITE("("); VISIT(visit_type_ref, &bare); TRANSPILE_WRITE("){"); -- cgit 1.4.1