| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of js_ast; | 5 part of js_ast; |
| 6 | 6 |
| 7 abstract class NodeVisitor<T> { | 7 abstract class NodeVisitor<T> { |
| 8 T visitProgram(Program node); | 8 T visitProgram(Program node); |
| 9 | 9 |
| 10 T visitBlock(Block node); | 10 T visitBlock(Block node); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 return clone; | 226 return clone; |
| 227 } | 227 } |
| 228 | 228 |
| 229 VariableUse asVariableUse() => null; | 229 VariableUse asVariableUse() => null; |
| 230 | 230 |
| 231 bool get isCommaOperator => false; | 231 bool get isCommaOperator => false; |
| 232 | 232 |
| 233 Statement toStatement() { | 233 Statement toStatement() { |
| 234 throw new UnsupportedError('toStatement'); | 234 throw new UnsupportedError('toStatement'); |
| 235 } | 235 } |
| 236 |
| 237 String debugPrint() => DebugPrint(this); |
| 236 } | 238 } |
| 237 | 239 |
| 238 class Program extends Node { | 240 class Program extends Node { |
| 239 final List<Statement> body; | 241 final List<Statement> body; |
| 240 Program(this.body); | 242 Program(this.body); |
| 241 | 243 |
| 242 accept(NodeVisitor visitor) => visitor.visitProgram(this); | 244 accept(NodeVisitor visitor) => visitor.visitProgram(this); |
| 243 void visitChildren(NodeVisitor visitor) { | 245 void visitChildren(NodeVisitor visitor) { |
| 244 for (Statement statement in body) statement.accept(visitor); | 246 for (Statement statement in body) statement.accept(visitor); |
| 245 } | 247 } |
| (...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1292 class Comment extends Statement { | 1294 class Comment extends Statement { |
| 1293 final String comment; | 1295 final String comment; |
| 1294 | 1296 |
| 1295 Comment(this.comment); | 1297 Comment(this.comment); |
| 1296 | 1298 |
| 1297 accept(NodeVisitor visitor) => visitor.visitComment(this); | 1299 accept(NodeVisitor visitor) => visitor.visitComment(this); |
| 1298 Comment _clone() => new Comment(comment); | 1300 Comment _clone() => new Comment(comment); |
| 1299 | 1301 |
| 1300 void visitChildren(NodeVisitor visitor) {} | 1302 void visitChildren(NodeVisitor visitor) {} |
| 1301 } | 1303 } |
| OLD | NEW |