Appearance
| 1 | namespace IR.Values is | |
| 2 | use TypeTyped = Semantic.Types.Typed; | |
| 3 | use Semantic.Types.Type; | |
| 4 | ||
| 5 | class NULL: Value, TypeTyped is | |
| 6 | type: Type; | |
| 7 | ||
| 8 | init( | |
| 9 | type: Type | |
| 10 | ) is | |
| 11 | super.init(); | |
| 12 | ||
| 13 | self.type = type; | |
| 14 | si | |
| 15 | ||
| 16 | gen(context: IR.CONTEXT) is | |
| 17 | context.write_line("ldnull"); | |
| 18 | si | |
| 19 | ||
| 20 | to_string() -> string => | |
| 21 | "null:[{type}]()"; | |
| 22 | si | |
| 23 | si |