Skip to content
← Back

src/ir/values/box.ghul

1
namespace IR.Values is
2
use Semantic.Types.Type;
3
4
class BOX: Value is
5
value: Value;
6
type: Type? => value.type;
7
is_value_type: bool => false;
8
9
init(
10
value: Value
11
) is
12
super.init();
13
14
self.value = value;
15
si
16
17
gen(context: IR.CONTEXT) is
18
gen(value, context);
19
20
let il_type = type!.get_il_type();
21
22
context.write_line("box {il_type}");
23
si
24
25
to_string() -> string =>
26
"box:[{type}]({value})";
27
si
28
si