Skip to content
← Back

src/ir/values/deref.ghul

1
namespace IR.Values is
2
use Semantic.Types.Type
3
4
class DEREF: Value is
5
type: Type
6
value: Value
7
8
is_deref: bool => true
9
has_address: bool => true
10
11
init(
12
value: Value,
13
type: Type
14
) is
15
super.init()
16
17
self.value = value
18
self.type = type
19
si
20
21
init(
22
value: Value
23
) is
24
init(value, value.type!)
25
si
26
27
accept(visitor: Visitor) is
28
visitor.visit(self)
29
si
30
31
accept_address(visitor: Visitor) is
32
visitor.visit_address(self)
33
si
34
35
to_string() -> string =>
36
"deref:[{type}]({value})"
37
si
38
si