| 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; | 5 part of dart_backend; |
| 6 | 6 |
| 7 class CloningVisitor implements Visitor<Node> { | 7 class CloningVisitor implements Visitor<Node> { |
| 8 final TreeElements originalTreeElements; | 8 final TreeElements originalTreeElements; |
| 9 final TreeElementMapping cloneTreeElements; | 9 final TreeElementMapping cloneTreeElements; |
| 10 | 10 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 visit(node.typeArguments), visit(node.entries), node.constKeyword); | 110 visit(node.typeArguments), visit(node.entries), node.constKeyword); |
| 111 | 111 |
| 112 visitLiteralMapEntry(LiteralMapEntry node) => new LiteralMapEntry( | 112 visitLiteralMapEntry(LiteralMapEntry node) => new LiteralMapEntry( |
| 113 visit(node.key), node.colonToken, visit(node.value)); | 113 visit(node.key), node.colonToken, visit(node.value)); |
| 114 | 114 |
| 115 visitLiteralNull(LiteralNull node) => new LiteralNull(node.token); | 115 visitLiteralNull(LiteralNull node) => new LiteralNull(node.token); |
| 116 | 116 |
| 117 visitLiteralString(LiteralString node) => new LiteralString( | 117 visitLiteralString(LiteralString node) => new LiteralString( |
| 118 node.token, node.dartString); | 118 node.token, node.dartString); |
| 119 | 119 |
| 120 visitMetadata(Metadata node) => new Metadata( |
| 121 node.token, visit(node.expression)); |
| 122 |
| 120 visitMixinApplication(MixinApplication node) => new MixinApplication( | 123 visitMixinApplication(MixinApplication node) => new MixinApplication( |
| 121 visit(node.superclass), visit(node.mixins)); | 124 visit(node.superclass), visit(node.mixins)); |
| 122 | 125 |
| 123 visitNamedMixinApplication(NamedMixinApplication node) => | 126 visitNamedMixinApplication(NamedMixinApplication node) => |
| 124 new NamedMixinApplication(visit(node.name), | 127 new NamedMixinApplication(visit(node.name), |
| 125 visit(node.typeParameters), | 128 visit(node.typeParameters), |
| 126 visit(node.modifiers), | 129 visit(node.modifiers), |
| 127 visit(node.mixinApplication), | 130 visit(node.mixinApplication), |
| 128 visit(node.interfaces), | 131 visit(node.interfaces), |
| 129 node.classKeyword, | 132 node.classKeyword, |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 visitTypeAnnotation(TypeAnnotation node) => new TypeAnnotation( | 209 visitTypeAnnotation(TypeAnnotation node) => new TypeAnnotation( |
| 207 visit(node.typeName), visit(node.typeArguments)); | 210 visit(node.typeName), visit(node.typeArguments)); |
| 208 | 211 |
| 209 visitTypedef(Typedef node) => new Typedef( | 212 visitTypedef(Typedef node) => new Typedef( |
| 210 visit(node.returnType), visit(node.name), visit(node.typeParameters), | 213 visit(node.returnType), visit(node.name), visit(node.typeParameters), |
| 211 visit(node.formals), node.typedefKeyword, node.endToken); | 214 visit(node.formals), node.typedefKeyword, node.endToken); |
| 212 | 215 |
| 213 visitTypeVariable(TypeVariable node) => new TypeVariable( | 216 visitTypeVariable(TypeVariable node) => new TypeVariable( |
| 214 visit(node.name), visit(node.bound)); | 217 visit(node.name), visit(node.bound)); |
| 215 | 218 |
| 216 visitVariableDefinitions(VariableDefinitions node) => new VariableDefinitions( | 219 visitVariableDefinitions(VariableDefinitions node) => |
| 217 visit(node.type), visit(node.modifiers), visit(node.definitions)); | 220 new VariableDefinitions.forParameter( |
| 221 visit(node.metadata), visit(node.type), |
| 222 visit(node.modifiers), visit(node.definitions)); |
| 218 | 223 |
| 219 visitWhile(While node) => new While( | 224 visitWhile(While node) => new While( |
| 220 visit(node.condition), visit(node.body), node.whileKeyword); | 225 visit(node.condition), visit(node.body), node.whileKeyword); |
| 221 | 226 |
| 222 Node visitNode(Node node) { | 227 Node visitNode(Node node) { |
| 223 unimplemented('visitNode', node: node); | 228 unimplemented('visitNode', node: node); |
| 224 } | 229 } |
| 225 | 230 |
| 226 Node visitCombinator(Combinator node) { | 231 Node visitCombinator(Combinator node) { |
| 227 unimplemented('visitNode', node: node); | 232 unimplemented('visitNode', node: node); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 } | 289 } |
| 285 | 290 |
| 286 Node visitStringNode(StringNode node) { | 291 Node visitStringNode(StringNode node) { |
| 287 unimplemented('visitNode', node: node); | 292 unimplemented('visitNode', node: node); |
| 288 } | 293 } |
| 289 | 294 |
| 290 unimplemented(String message, {Node node}) { | 295 unimplemented(String message, {Node node}) { |
| 291 throw message; | 296 throw message; |
| 292 } | 297 } |
| 293 } | 298 } |
| OLD | NEW |