about summary refs log tree commit diff
path: root/boot/ir.c
diff options
context:
space:
mode:
authorMel <mel@rnrd.eu>2026-05-30 23:04:48 +0200
committerMel <mel@rnrd.eu>2026-05-30 23:04:48 +0200
commitdd9f8fccf405af709c1d655dbec4be1561e990c0 (patch)
tree5f05eff13d01df0e1bd365e0c31a9b4b69284bdc /boot/ir.c
parent4ec376b67d605910cb7757dc2e15a28a942f59ca (diff)
downloadcatskill-dd9f8fccf405af709c1d655dbec4be1561e990c0.tar.zst
catskill-dd9f8fccf405af709c1d655dbec4be1561e990c0.zip
Define name resolution behavior, clean-up langauge object resolution
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'boot/ir.c')
-rw-r--r--boot/ir.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/boot/ir.c b/boot/ir.c
index af631f8..f1ae951 100644
--- a/boot/ir.c
+++ b/boot/ir.c
@@ -589,6 +589,18 @@ struct Unit
     Array(struct Lower_Error) lower_errors;
 };
 
+struct Type*
+unit_get_type(struct Unit* unit, Type_Id id)
+{
+    return *array_at(struct Type*, &unit->types.entries, id);
+}
+
+struct Function*
+unit_get_function(struct Unit* unit, Function_Id id)
+{
+    return *array_at(struct Function*, &unit->functions.entries, id);
+}
+
 REGION(struct Type, type)
 REGION(struct Function, function)
 REGION(struct Statement, statement)