Appearance
| 1 | namespace Syntax.Trees.Expressions is | |
| 2 | ||
| 3 | use Source | |
| 4 | ||
| 5 | class REFERENCE(location: LOCATION, left: Expression): Expression is | |
| 6 | super(location) | |
| 7 | ||
| 8 | // Set once the enclosing call is resolved: true when the matched | |
| 9 | // parameter writes this `ref` slot, so passing it definitely | |
| 10 | // assigns the target. Read by the condition analyzer to place | |
| 11 | // that assignment on the branch edges a `ref` in a condition | |
| 12 | // reaches. | |
| 13 | writes_target: bool public => reference_state.writes_target, = value is reference_state.writes_target = value si | |
| 14 | ||
| 15 | reference_state: Syntax.Process.REFERENCE_STATE field | |
| 16 | ||
| 17 | clear() is | |
| 18 | super.clear() | |
| 19 | reference_state.clear() | |
| 20 | si | |
| 21 | ||
| 22 | clear_outputs() is | |
| 23 | super.clear_outputs() | |
| 24 | reference_state.clear() | |
| 25 | si | |
| 26 | ||
| 27 | accept(visitor: Visitor) is | |
| 28 | visitor.visit(self) | |
| 29 | si | |
| 30 | ||
| 31 | walk(visitor: Visitor) is | |
| 32 | if !visitor.pre(self) then | |
| 33 | left.walk(visitor) | |
| 34 | fi | |
| 35 | ||
| 36 | accept(visitor) | |
| 37 | si | |
| 38 | si | |
| 39 | si |