Appearance
| 1 | namespace Semantic.Types is | |
| 2 | ||
| 3 | use Source.LOCATION; | |
| 4 | ||
| 5 | class POINTER: GENERIC is | |
| 6 | short_description: string => get_short_description(self); | |
| 7 | ||
| 8 | get_short_description(reference: GENERIC) -> string static => "{reference.arguments[0]} ptr"; | |
| 9 | ||
| 10 | init( | |
| 11 | location: LOCATION, | |
| 12 | symbol: Symbols.Classy, | |
| 13 | arguments: Collections.List[Type] | |
| 14 | ) is | |
| 15 | super.init(Symbols.POINTER(location, symbol, arguments[0])); | |
| 16 | si | |
| 17 | ||
| 18 | create( | |
| 19 | location: LOCATION, | |
| 20 | symbol: Symbols.Classy, | |
| 21 | arguments: Collections.List[Type] | |
| 22 | ) -> GENERIC => | |
| 23 | Types.POINTER(location, symbol, arguments); | |
| 24 | ||
| 25 | gen_class_name(buffer: System.Text.StringBuilder) is | |
| 26 | gen_type(buffer); | |
| 27 | si | |
| 28 | ||
| 29 | gen_type(buffer: System.Text.StringBuilder) is | |
| 30 | arguments[0].gen_type(buffer); | |
| 31 | buffer.append("* "); | |
| 32 | si | |
| 33 | ||
| 34 | to_string() -> string => get_short_description(self); | |
| 35 | si | |
| 36 | si |