| 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 dart_backend; |
| 6 |
| 5 class CloningVisitor implements Visitor<Node> { | 7 class CloningVisitor implements Visitor<Node> { |
| 6 final TreeElements originalTreeElements; | 8 final TreeElements originalTreeElements; |
| 7 final TreeElementMapping cloneTreeElements; | 9 final TreeElementMapping cloneTreeElements; |
| 8 | 10 |
| 9 CloningVisitor(this.originalTreeElements) | 11 CloningVisitor(this.originalTreeElements) |
| 10 : cloneTreeElements = new TreeElementMapping(); | 12 : cloneTreeElements = new TreeElementMapping(); |
| 11 | 13 |
| 12 visit(Node node) { | 14 visit(Node node) { |
| 13 if (node == null) return null; | 15 if (node == null) return null; |
| 14 final clone = node.accept(this); | 16 final clone = node.accept(this); |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 } | 270 } |
| 269 | 271 |
| 270 Node visitStringNode(StringNode node) { | 272 Node visitStringNode(StringNode node) { |
| 271 unimplemented('visitNode', node: node); | 273 unimplemented('visitNode', node: node); |
| 272 } | 274 } |
| 273 | 275 |
| 274 unimplemented(String message, {Node node}) { | 276 unimplemented(String message, {Node node}) { |
| 275 throw message; | 277 throw message; |
| 276 } | 278 } |
| 277 } | 279 } |
| OLD | NEW |