Appearance
| 1 | namespace IR.Values is | |
| 2 | use Ghul.Pipes | |
| 3 | ||
| 4 | use Semantic.Types.Type | |
| 5 | ||
| 6 | class NEW: Value is | |
| 7 | is_state_changing_call: bool => !constructor.constructs_store_free | |
| 8 | type: Type | |
| 9 | constructor: Semantic.Symbols.Function | |
| 10 | arguments: Collections.List[Value] | |
| 11 | ||
| 12 | init( | |
| 13 | type: Type, | |
| 14 | constructor: Semantic.Symbols.Function, | |
| 15 | arguments: Collections.List[Value] | |
| 16 | ) is | |
| 17 | super.init() | |
| 18 | ||
| 19 | self.type = type | |
| 20 | self.constructor = constructor | |
| 21 | self.arguments = arguments | |
| 22 | si | |
| 23 | ||
| 24 | accept(visitor: Visitor) is | |
| 25 | visitor.visit(self) | |
| 26 | si | |
| 27 | ||
| 28 | to_string() -> string => | |
| 29 | "new:[{type}](\"{constructor.name}\",{arguments |> join(",")})" | |
| 30 | si | |
| 31 | si |