about summary refs log tree commit diff
path: root/boot/transpile.c
diff options
context:
space:
mode:
authorMel <mel@rnrd.eu>2026-05-19 20:47:51 +0200
committerMel <mel@rnrd.eu>2026-05-19 20:57:18 +0200
commit556aafa5eb681f5500169268d3cdea82a298c2af (patch)
treef8f80301ceb6eb80071af9485a9a88f468b4fa7e /boot/transpile.c
parent952250b6d79063aa1066b0e945d58360bd70d09f (diff)
downloadcatskill-556aafa5eb681f5500169268d3cdea82a298c2af.tar.zst
catskill-556aafa5eb681f5500169268d3cdea82a298c2af.zip
Add IR constructors
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'boot/transpile.c')
-rw-r--r--boot/transpile.c4
1 files changed, 2 insertions, 2 deletions
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("){");