Appearance
| 1 | namespace Syntax.Trees.Expressions is | |
| 2 | use Source; | |
| 3 | ||
| 4 | class ASSERT_IN( | |
| 5 | location: LOCATION, | |
| 6 | condition: Expression, | |
| 7 | message: Expression?, | |
| 8 | expression: Expression | |
| 9 | ): Expression is | |
| 10 | description: string => "assert in expression"; | |
| 11 | ||
| 12 | must_be_consumed: bool => true; | |
| 13 | ||
| 14 | is_tuple_literal: bool => expression.is_tuple_literal; | |
| 15 | ||
| 16 | super(location); | |
| 17 | ||
| 18 | set_expected_type(expected_type: Semantic.Types.Type?, error_message: string?) is | |
| 19 | expression.set_expected_type(expected_type, error_message); | |
| 20 | si | |
| 21 | ||
| 22 | clear_expected_type() is | |
| 23 | expression.clear_expected_type(); | |
| 24 | si | |
| 25 | ||
| 26 | accept(visitor: Visitor) is | |
| 27 | visitor.visit(self); | |
| 28 | si | |
| 29 | ||
| 30 | walk(visitor: Visitor) is | |
| 31 | if !visitor.pre(self) then | |
| 32 | condition.walk(visitor); | |
| 33 | ||
| 34 | if message? then | |
| 35 | message!.walk(visitor); | |
| 36 | fi | |
| 37 | ||
| 38 | expression.walk(visitor); | |
| 39 | fi | |
| 40 | ||
| 41 | accept(visitor); | |
| 42 | si | |
| 43 | si | |
| 44 | si |