| 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; | 5 part of js; |
| 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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 | 535 |
| 536 Expression withPosition(var sourcePosition, var endSourcePosition) => | 536 Expression withPosition(var sourcePosition, var endSourcePosition) => |
| 537 super.withPosition(sourcePosition, endSourcePosition); | 537 super.withPosition(sourcePosition, endSourcePosition); |
| 538 } | 538 } |
| 539 | 539 |
| 540 /// Wrap a CodeBuffer as an expression. | 540 /// Wrap a CodeBuffer as an expression. |
| 541 class Blob extends Expression { | 541 class Blob extends Expression { |
| 542 // TODO(ahe): This class is an aid to convert everything to ASTs, remove when | 542 // TODO(ahe): This class is an aid to convert everything to ASTs, remove when |
| 543 // not needed anymore. | 543 // not needed anymore. |
| 544 | 544 |
| 545 final leg.CodeBuffer buffer; | 545 final CodeBuffer buffer; |
| 546 | 546 |
| 547 Blob(this.buffer); | 547 Blob(this.buffer); |
| 548 | 548 |
| 549 accept(NodeVisitor visitor) => visitor.visitBlob(this); | 549 accept(NodeVisitor visitor) => visitor.visitBlob(this); |
| 550 | 550 |
| 551 void visitChildren(NodeVisitor visitor) {} | 551 void visitChildren(NodeVisitor visitor) {} |
| 552 | 552 |
| 553 Blob _clone() => new Blob(buffer); | 553 Blob _clone() => new Blob(buffer); |
| 554 | 554 |
| 555 int get precedenceLevel => PRIMARY; | 555 int get precedenceLevel => PRIMARY; |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1100 class Comment extends Statement { | 1100 class Comment extends Statement { |
| 1101 final String comment; | 1101 final String comment; |
| 1102 | 1102 |
| 1103 Comment(this.comment); | 1103 Comment(this.comment); |
| 1104 | 1104 |
| 1105 accept(NodeVisitor visitor) => visitor.visitComment(this); | 1105 accept(NodeVisitor visitor) => visitor.visitComment(this); |
| 1106 Comment _clone() => new Comment(comment); | 1106 Comment _clone() => new Comment(comment); |
| 1107 | 1107 |
| 1108 void visitChildren(NodeVisitor visitor) {} | 1108 void visitChildren(NodeVisitor visitor) {} |
| 1109 } | 1109 } |
| OLD | NEW |