Index: lib/compiler/implementation/tree/nodes.dart |
diff --git a/lib/compiler/implementation/tree/nodes.dart b/lib/compiler/implementation/tree/nodes.dart |
index 2074ddc0bdcb282fa71d4dd06298783fd695ea64..7bb165d10a1aae3893977d03c7cafd6da486b52e 100644 |
--- a/lib/compiler/implementation/tree/nodes.dart |
+++ b/lib/compiler/implementation/tree/nodes.dart |
@@ -5,6 +5,8 @@ |
interface Visitor<R> { |
R visitBlock(Block node); |
R visitBreakStatement(BreakStatement node); |
+ R visitCascade(Cascade node); |
+ R visitCascadeReceiver(CascadeReceiver node); |
R visitCatchBlock(CatchBlock node); |
R visitClassNode(ClassNode node); |
R visitConditional(Conditional node); |
@@ -108,6 +110,8 @@ class Node implements Hashable { |
Block asBlock() => null; |
BreakStatement asBreakStatement() => null; |
+ Cascade asCascade() => null; |
+ CascadeReceiver asCascadeReceiver() => null; |
CatchBlock asCatchBlock() => null; |
ClassNode asClassNode() => null; |
Conditional asConditional() => null; |
@@ -1564,6 +1568,39 @@ class TryStatement extends Statement { |
} |
} |
+class Cascade extends Node { |
+ final Node expression; |
+ Cascade(this.expression); |
+ |
+ Cascade asCascade() => this; |
+ accept(Visitor visitor) => visitor.visitCascade(this); |
+ |
+ void visitChildren(Visitor visitor) { |
+ expression.accept(visitor); |
+ } |
+ |
+ Token getBeginToken() => expression.getBeginToken(); |
+ |
+ Token getEndToken() => expression.getEndToken(); |
+} |
+ |
+class CascadeReceiver extends Node { |
+ final Node expression; |
+ final Token cascadeOperator; |
+ CascadeReceiver(this.expression, this.cascadeOperator); |
+ |
+ CascadeReceiver asCascadeReceiver() => this; |
+ accept(Visitor visitor) => visitor.visitCascadeReceiver(this); |
+ |
+ void visitChildren(Visitor visitor) { |
+ expression.accept(visitor); |
+ } |
+ |
+ Token getBeginToken() => expression.getBeginToken(); |
+ |
+ Token getEndToken() => expression.getEndToken(); |
+} |
+ |
class CatchBlock extends Node { |
final NodeList formals; |
final Block block; |