From dd9f8fccf405af709c1d655dbec4be1561e990c0 Mon Sep 17 00:00:00 2001 From: Mel Date: Sat, 30 May 2026 23:04:48 +0200 Subject: Define name resolution behavior, clean-up langauge object resolution Signed-off-by: Mel --- boot/ir.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'boot/ir.c') 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) -- cgit 1.4.1