| 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 engine.resolver.element_resolver; | 5 library engine.resolver.element_resolver; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'ast.dart'; | 9 import 'ast.dart'; |
| 10 import 'element.dart'; | 10 import 'element.dart'; |
| (...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 // | 985 // |
| 986 if (node.isSynthetic) { | 986 if (node.isSynthetic) { |
| 987 return null; | 987 return null; |
| 988 } | 988 } |
| 989 // | 989 // |
| 990 // Ignore nodes that should have been resolved before getting here. | 990 // Ignore nodes that should have been resolved before getting here. |
| 991 // | 991 // |
| 992 if (node.inDeclarationContext()) { | 992 if (node.inDeclarationContext()) { |
| 993 return null; | 993 return null; |
| 994 } | 994 } |
| 995 if (node.staticElement is LocalVariableElement || |
| 996 node.staticElement is ParameterElement) { |
| 997 return null; |
| 998 } |
| 995 AstNode parent = node.parent; | 999 AstNode parent = node.parent; |
| 996 if (parent is FieldFormalParameter) { | 1000 if (parent is FieldFormalParameter) { |
| 997 return null; | 1001 return null; |
| 998 } else if (parent is ConstructorFieldInitializer && | 1002 } else if (parent is ConstructorFieldInitializer && |
| 999 parent.fieldName == node) { | 1003 parent.fieldName == node) { |
| 1000 return null; | 1004 return null; |
| 1001 } else if (parent is Annotation && parent.constructorName == node) { | 1005 } else if (parent is Annotation && parent.constructorName == node) { |
| 1002 return null; | 1006 return null; |
| 1003 } | 1007 } |
| 1004 // | 1008 // |
| (...skipping 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2580 | 2584 |
| 2581 @override | 2585 @override |
| 2582 Element get staticElement => null; | 2586 Element get staticElement => null; |
| 2583 | 2587 |
| 2584 @override | 2588 @override |
| 2585 accept(AstVisitor visitor) => null; | 2589 accept(AstVisitor visitor) => null; |
| 2586 | 2590 |
| 2587 @override | 2591 @override |
| 2588 void visitChildren(AstVisitor visitor) {} | 2592 void visitChildren(AstVisitor visitor) {} |
| 2589 } | 2593 } |
| OLD | NEW |