Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(417)

Unified Diff: pkg/kernel/lib/ast.dart

Issue 2740273003: Add visitor with additional argument for Statement nodes (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/kernel/lib/visitor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/ast.dart
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index aafafcd077580d52263a7f468cbfc84a0ddb0ff2..7ceb81113e7cef9493ee224df68ec0919e242b22 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -2755,6 +2755,7 @@ class CheckLibraryIsLoaded extends Expression {
abstract class Statement extends TreeNode {
accept(StatementVisitor v);
+ accept1(StatementVisitor1 v, arg);
}
/// A statement with a compile-time error.
@@ -2762,6 +2763,7 @@ abstract class Statement extends TreeNode {
/// Should throw an exception at runtime.
class InvalidStatement extends Statement {
accept(StatementVisitor v) => v.visitInvalidStatement(this);
+ accept1(StatementVisitor1 v, arg) => v.visitInvalidStatement(this, arg);
visitChildren(Visitor v) {}
transformChildren(Transformer v) {}
@@ -2775,6 +2777,7 @@ class ExpressionStatement extends Statement {
}
accept(StatementVisitor v) => v.visitExpressionStatement(this);
+ accept1(StatementVisitor1 v, arg) => v.visitExpressionStatement(this, arg);
visitChildren(Visitor v) {
expression?.accept(v);
@@ -2796,6 +2799,7 @@ class Block extends Statement {
}
accept(StatementVisitor v) => v.visitBlock(this);
+ accept1(StatementVisitor1 v, arg) => v.visitBlock(this, arg);
visitChildren(Visitor v) {
visitList(statements, v);
@@ -2813,6 +2817,7 @@ class Block extends Statement {
class EmptyStatement extends Statement {
accept(StatementVisitor v) => v.visitEmptyStatement(this);
+ accept1(StatementVisitor1 v, arg) => v.visitEmptyStatement(this, arg);
visitChildren(Visitor v) {}
transformChildren(Transformer v) {}
@@ -2828,6 +2833,7 @@ class AssertStatement extends Statement {
}
accept(StatementVisitor v) => v.visitAssertStatement(this);
+ accept1(StatementVisitor1 v, arg) => v.visitAssertStatement(this, arg);
visitChildren(Visitor v) {
condition?.accept(v);
@@ -2859,6 +2865,7 @@ class LabeledStatement extends Statement {
}
accept(StatementVisitor v) => v.visitLabeledStatement(this);
+ accept1(StatementVisitor1 v, arg) => v.visitLabeledStatement(this, arg);
visitChildren(Visitor v) {
body?.accept(v);
@@ -2898,6 +2905,7 @@ class BreakStatement extends Statement {
BreakStatement(this.target);
accept(StatementVisitor v) => v.visitBreakStatement(this);
+ accept1(StatementVisitor1 v, arg) => v.visitBreakStatement(this, arg);
visitChildren(Visitor v) {}
transformChildren(Transformer v) {}
@@ -2913,6 +2921,7 @@ class WhileStatement extends Statement {
}
accept(StatementVisitor v) => v.visitWhileStatement(this);
+ accept1(StatementVisitor1 v, arg) => v.visitWhileStatement(this, arg);
visitChildren(Visitor v) {
condition?.accept(v);
@@ -2941,6 +2950,7 @@ class DoStatement extends Statement {
}
accept(StatementVisitor v) => v.visitDoStatement(this);
+ accept1(StatementVisitor1 v, arg) => v.visitDoStatement(this, arg);
visitChildren(Visitor v) {
body?.accept(v);
@@ -2973,6 +2983,7 @@ class ForStatement extends Statement {
}
accept(StatementVisitor v) => v.visitForStatement(this);
+ accept1(StatementVisitor1 v, arg) => v.visitForStatement(this, arg);
visitChildren(Visitor v) {
visitList(variables, v);
@@ -3009,6 +3020,7 @@ class ForInStatement extends Statement {
}
accept(StatementVisitor v) => v.visitForInStatement(this);
+ accept1(StatementVisitor1 v, arg) => v.visitForInStatement(this, arg);
visitChildren(Visitor v) {
variable?.accept(v);
@@ -3046,6 +3058,7 @@ class SwitchStatement extends Statement {
}
accept(StatementVisitor v) => v.visitSwitchStatement(this);
+ accept1(StatementVisitor1 v, arg) => v.visitSwitchStatement(this, arg);
visitChildren(Visitor v) {
expression?.accept(v);
@@ -3108,6 +3121,8 @@ class ContinueSwitchStatement extends Statement {
ContinueSwitchStatement(this.target);
accept(StatementVisitor v) => v.visitContinueSwitchStatement(this);
+ accept1(StatementVisitor1 v, arg) =>
+ v.visitContinueSwitchStatement(this, arg);
visitChildren(Visitor v) {}
transformChildren(Transformer v) {}
@@ -3125,6 +3140,7 @@ class IfStatement extends Statement {
}
accept(StatementVisitor v) => v.visitIfStatement(this);
+ accept1(StatementVisitor1 v, arg) => v.visitIfStatement(this, arg);
visitChildren(Visitor v) {
condition?.accept(v);
@@ -3156,6 +3172,7 @@ class ReturnStatement extends Statement {
}
accept(StatementVisitor v) => v.visitReturnStatement(this);
+ accept1(StatementVisitor1 v, arg) => v.visitReturnStatement(this, arg);
visitChildren(Visitor v) {
expression?.accept(v);
@@ -3179,6 +3196,7 @@ class TryCatch extends Statement {
}
accept(StatementVisitor v) => v.visitTryCatch(this);
+ accept1(StatementVisitor1 v, arg) => v.visitTryCatch(this, arg);
visitChildren(Visitor v) {
body?.accept(v);
@@ -3244,6 +3262,7 @@ class TryFinally extends Statement {
}
accept(StatementVisitor v) => v.visitTryFinally(this);
+ accept1(StatementVisitor1 v, arg) => v.visitTryFinally(this, arg);
visitChildren(Visitor v) {
body?.accept(v);
@@ -3291,6 +3310,7 @@ class YieldStatement extends Statement {
}
accept(StatementVisitor v) => v.visitYieldStatement(this);
+ accept1(StatementVisitor1 v, arg) => v.visitYieldStatement(this, arg);
visitChildren(Visitor v) {
expression?.accept(v);
@@ -3368,6 +3388,7 @@ class VariableDeclaration extends Statement {
}
accept(StatementVisitor v) => v.visitVariableDeclaration(this);
+ accept1(StatementVisitor1 v, arg) => v.visitVariableDeclaration(this, arg);
visitChildren(Visitor v) {
type?.accept(v);
@@ -3401,6 +3422,7 @@ class FunctionDeclaration extends Statement {
}
accept(StatementVisitor v) => v.visitFunctionDeclaration(this);
+ accept1(StatementVisitor1 v, arg) => v.visitFunctionDeclaration(this, arg);
visitChildren(Visitor v) {
variable?.accept(v);
« no previous file with comments | « no previous file | pkg/kernel/lib/visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698