| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library analyzer.src.dart.constant.utilities; | 5 library analyzer.src.dart.constant.utilities; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/visitor.dart'; | 10 import 'package:analyzer/dart/ast/visitor.dart'; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 ConstantAstCloner() : super(true); | 39 ConstantAstCloner() : super(true); |
| 40 | 40 |
| 41 @override | 41 @override |
| 42 ConstructorName visitConstructorName(ConstructorName node) { | 42 ConstructorName visitConstructorName(ConstructorName node) { |
| 43 ConstructorName name = super.visitConstructorName(node); | 43 ConstructorName name = super.visitConstructorName(node); |
| 44 name.staticElement = node.staticElement; | 44 name.staticElement = node.staticElement; |
| 45 return name; | 45 return name; |
| 46 } | 46 } |
| 47 | 47 |
| 48 @override | 48 @override |
| 49 Annotation visitAnnotation(Annotation node) { |
| 50 Annotation annotation = super.visitAnnotation(node); |
| 51 annotation.element = node.element; |
| 52 return annotation; |
| 53 } |
| 54 |
| 55 @override |
| 49 FunctionExpression visitFunctionExpression(FunctionExpression node) { | 56 FunctionExpression visitFunctionExpression(FunctionExpression node) { |
| 50 FunctionExpression expression = super.visitFunctionExpression(node); | 57 FunctionExpression expression = super.visitFunctionExpression(node); |
| 51 expression.element = node.element; | 58 expression.element = node.element; |
| 52 return expression; | 59 return expression; |
| 53 } | 60 } |
| 54 | 61 |
| 55 @override | 62 @override |
| 56 InstanceCreationExpression visitInstanceCreationExpression( | 63 InstanceCreationExpression visitInstanceCreationExpression( |
| 57 InstanceCreationExpression node) { | 64 InstanceCreationExpression node) { |
| 58 InstanceCreationExpression expression = | 65 InstanceCreationExpression expression = |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 @override | 311 @override |
| 305 Object visitSuperConstructorInvocation(SuperConstructorInvocation node) { | 312 Object visitSuperConstructorInvocation(SuperConstructorInvocation node) { |
| 306 super.visitSuperConstructorInvocation(node); | 313 super.visitSuperConstructorInvocation(node); |
| 307 ConstructorElement constructor = getConstructorImpl(node.staticElement); | 314 ConstructorElement constructor = getConstructorImpl(node.staticElement); |
| 308 if (constructor != null) { | 315 if (constructor != null) { |
| 309 _callback(constructor); | 316 _callback(constructor); |
| 310 } | 317 } |
| 311 return null; | 318 return null; |
| 312 } | 319 } |
| 313 } | 320 } |
| OLD | NEW |