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 | 7 |
8 import '../tree/tree.dart'; | 8 import '../tree/tree.dart'; |
9 import '../util/util.dart'; | 9 import '../util/util.dart'; |
10 import '../resolution/resolution.dart'; | 10 import '../resolution/resolution.dart'; |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 // A different target statement only happens if the body is itself | 592 // A different target statement only happens if the body is itself |
593 // a break or continue for a different target. In that case, this | 593 // a break or continue for a different target. In that case, this |
594 // label is also always unused. | 594 // label is also always unused. |
595 return element == null || element.statement != body; | 595 return element == null || element.statement != body; |
596 } | 596 } |
597 } | 597 } |
598 | 598 |
599 abstract class ErroneousElement extends Element implements FunctionElement { | 599 abstract class ErroneousElement extends Element implements FunctionElement { |
600 MessageKind get messageKind; | 600 MessageKind get messageKind; |
601 Map get messageArguments; | 601 Map get messageArguments; |
| 602 String get message; |
602 } | 603 } |
603 | 604 |
604 /// An [Element] whose usage should cause a warning. | 605 /// An [Element] whose usage should cause a warning. |
605 abstract class WarnOnUseElement extends Element { | 606 abstract class WarnOnUseElement extends Element { |
606 /// The element whose usage cause a warning. | 607 /// The element whose usage cause a warning. |
607 Element get wrappedElement; | 608 Element get wrappedElement; |
608 | 609 |
609 /// Reports the attached warning and returns the wrapped element. | 610 /// Reports the attached warning and returns the wrapped element. |
610 /// [usageSpannable] is used to report messages on the reference of | 611 /// [usageSpannable] is used to report messages on the reference of |
611 /// [wrappedElement]. | 612 /// [wrappedElement]. |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 int get resolutionState; | 980 int get resolutionState; |
980 Token get beginToken; | 981 Token get beginToken; |
981 Token get endToken; | 982 Token get endToken; |
982 | 983 |
983 // TODO(kasperl): Try to get rid of these. | 984 // TODO(kasperl): Try to get rid of these. |
984 void set annotatedElement(Element value); | 985 void set annotatedElement(Element value); |
985 void set resolutionState(int value); | 986 void set resolutionState(int value); |
986 | 987 |
987 MetadataAnnotation ensureResolved(Compiler compiler); | 988 MetadataAnnotation ensureResolved(Compiler compiler); |
988 } | 989 } |
OLD | NEW |