Skip to content
← Back

src/ir/values/type_expression.ghul

1
namespace IR.Values is
2
use TypeTyped = Semantic.Types.Typed;
3
use Semantic.Types.Type;
4
5
class TYPE_EXPRESSION: Value, TypeTyped is
6
type: Type;
7
location: Source.LOCATION;
8
has_location: bool => true;
9
is_type_expression: bool => true;
10
is_consumable: bool => false;
11
12
init(
13
type: Type,
14
location: Source.LOCATION
15
) is
16
super.init();
17
18
self.type = type;
19
self.location = location;
20
si
21
22
gen(context: IR.CONTEXT) is
23
IoC.CONTAINER.instance.logger.poison(location, "generated type expression: {type} from {location}");
24
context.fixme("type expression {type} from {location}");
25
si
26
27
to_string() -> string =>
28
"type-expression:[{type}]()";
29
si
30
si