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 library elements; | 5 library elements; |
6 | 6 |
7 import '../compiler.dart' show | 7 import '../compiler.dart' show |
8 Compiler; | 8 Compiler; |
9 import '../constants/constructors.dart'; | 9 import '../constants/constructors.dart'; |
10 import '../constants/expressions.dart'; | 10 import '../constants/expressions.dart'; |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
403 bool get isSynthesized; | 403 bool get isSynthesized; |
404 bool get isMixinApplication; | 404 bool get isMixinApplication; |
405 | 405 |
406 bool get hasFixedBackendName; | 406 bool get hasFixedBackendName; |
407 String get fixedBackendName; | 407 String get fixedBackendName; |
408 | 408 |
409 bool get isAbstract; | 409 bool get isAbstract; |
410 | 410 |
411 Scope buildScope(); | 411 Scope buildScope(); |
412 | 412 |
413 void diagnose(Element context, DiagnosticListener listener); | |
414 | |
415 // TODO(johnniwinther): Move this to [AstElement]. | 413 // TODO(johnniwinther): Move this to [AstElement]. |
416 /// Returns the [Element] that holds the [TreeElements] for this element. | 414 /// Returns the [Element] that holds the [TreeElements] for this element. |
417 AnalyzableElement get analyzableElement; | 415 AnalyzableElement get analyzableElement; |
418 | 416 |
419 accept(ElementVisitor visitor, arg); | 417 accept(ElementVisitor visitor, arg); |
420 } | 418 } |
421 | 419 |
422 class Elements { | 420 class Elements { |
423 static bool isUnresolved(Element e) { | 421 static bool isUnresolved(Element e) { |
424 return e == null || e.isErroneous; | 422 return e == null || e.isErroneous; |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
813 /// name. | 811 /// name. |
814 /// | 812 /// |
815 /// Ambiguous elements are created during handling of import/export scopes. If | 813 /// Ambiguous elements are created during handling of import/export scopes. If |
816 /// an ambiguous element is encountered during resolution a warning/error is | 814 /// an ambiguous element is encountered during resolution a warning/error is |
817 /// reported. | 815 /// reported. |
818 abstract class AmbiguousElement extends Element { | 816 abstract class AmbiguousElement extends Element { |
819 MessageKind get messageKind; | 817 MessageKind get messageKind; |
820 Map get messageArguments; | 818 Map get messageArguments; |
821 Element get existingElement; | 819 Element get existingElement; |
822 Element get newElement; | 820 Element get newElement; |
821 | |
822 /// Compute the info message associated with an error/warning on [context]. | |
sigurdm
2015/09/24 12:51:21
message -> messages
Johnni Winther
2015/09/24 13:00:51
Done.
| |
823 List<DiagnosticMessage> computeInfos( | |
824 Element context, DiagnosticListener listener); | |
823 } | 825 } |
824 | 826 |
825 // TODO(kasperl): This probably shouldn't be called an element. It's | 827 // TODO(kasperl): This probably shouldn't be called an element. It's |
826 // just an interface shared by classes and libraries. | 828 // just an interface shared by classes and libraries. |
827 abstract class ScopeContainerElement implements Element { | 829 abstract class ScopeContainerElement implements Element { |
828 Element localLookup(String elementName); | 830 Element localLookup(String elementName); |
829 | 831 |
830 void forEachLocalMember(f(Element element)); | 832 void forEachLocalMember(f(Element element)); |
831 } | 833 } |
832 | 834 |
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1683 bool get isDeclaredByField; | 1685 bool get isDeclaredByField; |
1684 | 1686 |
1685 /// Returns `true` if this member is abstract. | 1687 /// Returns `true` if this member is abstract. |
1686 bool get isAbstract; | 1688 bool get isAbstract; |
1687 | 1689 |
1688 /// If abstract, [implementation] points to the overridden concrete member, | 1690 /// If abstract, [implementation] points to the overridden concrete member, |
1689 /// if any. Otherwise [implementation] points to the member itself. | 1691 /// if any. Otherwise [implementation] points to the member itself. |
1690 Member get implementation; | 1692 Member get implementation; |
1691 } | 1693 } |
1692 | 1694 |
OLD | NEW |