| 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 class CloningVisitor implements Visitor<Node> { | 5 class CloningVisitor implements Visitor<Node> { |
| 6 final TreeElements originalTreeElements; | 6 final TreeElements originalTreeElements; |
| 7 final TreeElementMapping cloneTreeElements; | 7 final TreeElementMapping cloneTreeElements; |
| 8 | 8 |
| 9 CloningVisitor(this.originalTreeElements) | 9 CloningVisitor(this.originalTreeElements) |
| 10 : cloneTreeElements = new TreeElementMapping(); | 10 : cloneTreeElements = new TreeElementMapping(); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 visit(node.expression), node.cascadeOperator); | 37 visit(node.expression), node.cascadeOperator); |
| 38 | 38 |
| 39 visitCaseMatch(CaseMatch node) => new CaseMatch( | 39 visitCaseMatch(CaseMatch node) => new CaseMatch( |
| 40 node.caseKeyword, visit(node.expression), node.colonToken); | 40 node.caseKeyword, visit(node.expression), node.colonToken); |
| 41 | 41 |
| 42 visitCatchBlock(CatchBlock node) => new CatchBlock( | 42 visitCatchBlock(CatchBlock node) => new CatchBlock( |
| 43 visit(node.type), visit(node.formals), visit(node.block), | 43 visit(node.type), visit(node.formals), visit(node.block), |
| 44 node.onKeyword, node.catchKeyword); | 44 node.onKeyword, node.catchKeyword); |
| 45 | 45 |
| 46 visitClassNode(ClassNode node) => new ClassNode( | 46 visitClassNode(ClassNode node) => new ClassNode( |
| 47 visit(node.name), visit(node.typeParameters), | 47 visit(node.modifiers), visit(node.name), visit(node.typeParameters), |
| 48 visit(node.superclass), visit(node.interfaces), visit(node.defaultClause), | 48 visit(node.superclass), visit(node.interfaces), visit(node.defaultClause), |
| 49 node.beginToken, node.extendsKeyword, visit(node.body), node.endToken); | 49 node.beginToken, node.extendsKeyword, visit(node.body), node.endToken); |
| 50 | 50 |
| 51 visitConditional(Conditional node) => new Conditional( | 51 visitConditional(Conditional node) => new Conditional( |
| 52 visit(node.condition), visit(node.thenExpression), | 52 visit(node.condition), visit(node.thenExpression), |
| 53 visit(node.elseExpression), node.questionToken, node.colonToken); | 53 visit(node.elseExpression), node.questionToken, node.colonToken); |
| 54 | 54 |
| 55 visitContinueStatement(ContinueStatement node) => new ContinueStatement( | 55 visitContinueStatement(ContinueStatement node) => new ContinueStatement( |
| 56 visit(node.target), node.keywordToken, node.semicolonToken); | 56 visit(node.target), node.keywordToken, node.semicolonToken); |
| 57 | 57 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 } | 269 } |
| 270 | 270 |
| 271 Node visitStringNode(StringNode node) { | 271 Node visitStringNode(StringNode node) { |
| 272 unimplemented('visitNode', node: node); | 272 unimplemented('visitNode', node: node); |
| 273 } | 273 } |
| 274 | 274 |
| 275 unimplemented(String message, {Node node}) { | 275 unimplemented(String message, {Node node}) { |
| 276 throw message; | 276 throw message; |
| 277 } | 277 } |
| 278 } | 278 } |
| OLD | NEW |