Skip to content
← Back

src/semantic/types/reference.ghul

1
namespace Semantic.Types is
2
3
use Source.LOCATION
4
5
class REFERENCE: GENERIC is
6
short_description: string => get_short_description(self)
7
is_ref: bool => true
8
9
get_short_description(reference: GENERIC) -> string static => "{reference.arguments[0]} ref"
10
11
init(
12
location: LOCATION,
13
symbol: Symbols.Classy,
14
arguments: Collections.List[Type]
15
) is
16
super.init(Symbols.REFERENCE(location, symbol, arguments[0]))
17
si
18
19
create(
20
location: LOCATION,
21
symbol: Symbols.Classy,
22
arguments: Collections.List[Type]
23
) -> GENERIC =>
24
Types.REFERENCE(location, symbol, arguments)
25
26
to_string() -> string => get_short_description(self)
27
si
28
si