Skip to content
← Back

src/syntax/trees/statements/throw.ghul

1
namespace Syntax.Trees.Statements is
2
use Source;
3
4
class THROW(location: LOCATION, expression: Expressions.Expression?): Statement is
5
expects_semicolon: bool => true;
6
provides_value: bool => true; // not exactly, but it's valid to use it in an expression context
7
8
super(location);
9
10
accept(visitor: Visitor) is
11
visitor.visit(self);
12
si
13
14
walk(visitor: Visitor) is
15
if !visitor.pre(self) then
16
if expression? then
17
expression!.walk(visitor);
18
fi
19
fi
20
21
accept(visitor);
22
si
23
si
24
si