| 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 30 matching lines...) Expand all Loading... |
| 41 ConstantAstCloner() : super(true); | 41 ConstantAstCloner() : super(true); |
| 42 | 42 |
| 43 @override | 43 @override |
| 44 ConstructorName visitConstructorName(ConstructorName node) { | 44 ConstructorName visitConstructorName(ConstructorName node) { |
| 45 ConstructorName name = super.visitConstructorName(node); | 45 ConstructorName name = super.visitConstructorName(node); |
| 46 name.staticElement = node.staticElement; | 46 name.staticElement = node.staticElement; |
| 47 return name; | 47 return name; |
| 48 } | 48 } |
| 49 | 49 |
| 50 @override | 50 @override |
| 51 FunctionExpression visitFunctionExpression(FunctionExpression node) { |
| 52 FunctionExpression expression = super.visitFunctionExpression(node); |
| 53 expression.element = node.element; |
| 54 return expression; |
| 55 } |
| 56 |
| 57 @override |
| 51 InstanceCreationExpression visitInstanceCreationExpression( | 58 InstanceCreationExpression visitInstanceCreationExpression( |
| 52 InstanceCreationExpression node) { | 59 InstanceCreationExpression node) { |
| 53 InstanceCreationExpression expression = | 60 InstanceCreationExpression expression = |
| 54 super.visitInstanceCreationExpression(node); | 61 super.visitInstanceCreationExpression(node); |
| 55 expression.staticElement = node.staticElement; | 62 expression.staticElement = node.staticElement; |
| 56 return expression; | 63 return expression; |
| 57 } | 64 } |
| 58 | 65 |
| 59 @override | 66 @override |
| 60 RedirectingConstructorInvocation visitRedirectingConstructorInvocation( | 67 RedirectingConstructorInvocation visitRedirectingConstructorInvocation( |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 @override | 312 @override |
| 306 Object visitSuperConstructorInvocation(SuperConstructorInvocation node) { | 313 Object visitSuperConstructorInvocation(SuperConstructorInvocation node) { |
| 307 super.visitSuperConstructorInvocation(node); | 314 super.visitSuperConstructorInvocation(node); |
| 308 ConstructorElement constructor = getConstructorImpl(node.staticElement); | 315 ConstructorElement constructor = getConstructorImpl(node.staticElement); |
| 309 if (constructor != null) { | 316 if (constructor != null) { |
| 310 _callback(constructor); | 317 _callback(constructor); |
| 311 } | 318 } |
| 312 return null; | 319 return null; |
| 313 } | 320 } |
| 314 } | 321 } |
| OLD | NEW |