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.generated.element_resolver; | 5 library analyzer.src.generated.element_resolver; |
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/syntactic_entity.dart'; | 10 import 'package:analyzer/dart/ast/syntactic_entity.dart'; |
(...skipping 1973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1984 if (nameNode1 != null && nameNode2 != null && nameNode3 != null) { | 1984 if (nameNode1 != null && nameNode2 != null && nameNode3 != null) { |
1985 Element element2 = nameNode2.staticElement; | 1985 Element element2 = nameNode2.staticElement; |
1986 // element2 should be ClassElement | 1986 // element2 should be ClassElement |
1987 if (element2 is ClassElement) { | 1987 if (element2 is ClassElement) { |
1988 String name3 = nameNode3.name; | 1988 String name3 = nameNode3.name; |
1989 // prefix.Class.CONST | 1989 // prefix.Class.CONST |
1990 PropertyAccessorElement getter = | 1990 PropertyAccessorElement getter = |
1991 element2.lookUpGetter(name3, _definingLibrary); | 1991 element2.lookUpGetter(name3, _definingLibrary); |
1992 if (getter != null) { | 1992 if (getter != null) { |
1993 nameNode3.staticElement = getter; | 1993 nameNode3.staticElement = getter; |
1994 annotation.element = element2; | 1994 annotation.element = getter; |
1995 _resolveAnnotationElementGetter(annotation, getter); | 1995 _resolveAnnotationElementGetter(annotation, getter); |
1996 return; | 1996 return; |
1997 } | 1997 } |
1998 // prefix.Class.constructor(args) | 1998 // prefix.Class.constructor(args) |
1999 constructor = new InterfaceTypeImpl(element2) | 1999 constructor = new InterfaceTypeImpl(element2) |
2000 .lookUpConstructor(name3, _definingLibrary); | 2000 .lookUpConstructor(name3, _definingLibrary); |
2001 nameNode3.staticElement = constructor; | 2001 nameNode3.staticElement = constructor; |
2002 } | 2002 } |
2003 } | 2003 } |
2004 // we need constructor | 2004 // we need constructor |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2638 | 2638 |
2639 @override | 2639 @override |
2640 Element get staticElement => null; | 2640 Element get staticElement => null; |
2641 | 2641 |
2642 @override | 2642 @override |
2643 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => null; | 2643 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => null; |
2644 | 2644 |
2645 @override | 2645 @override |
2646 void visitChildren(AstVisitor visitor) {} | 2646 void visitChildren(AstVisitor visitor) {} |
2647 } | 2647 } |
OLD | NEW |