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 10 matching lines...) Expand all Loading... | |
21 Selector, | 21 Selector, |
22 Constant, | 22 Constant, |
23 Compiler; | 23 Compiler; |
24 | 24 |
25 import '../dart_types.dart'; | 25 import '../dart_types.dart'; |
26 | 26 |
27 import '../scanner/scannerlib.dart' show Token, | 27 import '../scanner/scannerlib.dart' show Token, |
28 isUserDefinableOperator, | 28 isUserDefinableOperator, |
29 isMinusOperator; | 29 isMinusOperator; |
30 | 30 |
31 import '../ir/ir_nodes.dart' show IrNode; | |
32 | |
31 const int STATE_NOT_STARTED = 0; | 33 const int STATE_NOT_STARTED = 0; |
32 const int STATE_STARTED = 1; | 34 const int STATE_STARTED = 1; |
33 const int STATE_DONE = 2; | 35 const int STATE_DONE = 2; |
34 | 36 |
35 class ElementCategory { | 37 class ElementCategory { |
36 /** | 38 /** |
37 * Represents things that we don't expect to find when looking in a | 39 * Represents things that we don't expect to find when looking in a |
38 * scope. | 40 * scope. |
39 */ | 41 */ |
40 static const int NONE = 0; | 42 static const int NONE = 0; |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
171 abstract class Element implements Spannable { | 173 abstract class Element implements Spannable { |
172 String get name; | 174 String get name; |
173 ElementKind get kind; | 175 ElementKind get kind; |
174 Modifiers get modifiers; | 176 Modifiers get modifiers; |
175 Element get enclosingElement; | 177 Element get enclosingElement; |
176 Link<MetadataAnnotation> get metadata; | 178 Link<MetadataAnnotation> get metadata; |
177 | 179 |
178 Node parseNode(DiagnosticListener listener); | 180 Node parseNode(DiagnosticListener listener); |
179 DartType computeType(Compiler compiler); | 181 DartType computeType(Compiler compiler); |
180 | 182 |
183 bool hasIrNode(Compiler compiler); | |
ngeoffray
2013/11/20 14:55:27
I wouldn't put those helpers here. If someone want
lukas
2013/11/20 15:13:26
It was suggested by Kasper:
https://codereview.chr
| |
184 IrNode irNode(Compiler compiler); | |
185 | |
181 bool isFunction(); | 186 bool isFunction(); |
182 bool isConstructor(); | 187 bool isConstructor(); |
183 bool isClosure(); | 188 bool isClosure(); |
184 bool isMember(); | 189 bool isMember(); |
185 bool isInstanceMember(); | 190 bool isInstanceMember(); |
186 | 191 |
187 bool isFactoryConstructor(); | 192 bool isFactoryConstructor(); |
188 bool isGenerativeConstructor(); | 193 bool isGenerativeConstructor(); |
189 bool isGenerativeConstructorBody(); | 194 bool isGenerativeConstructorBody(); |
190 bool isCompilationUnit(); | 195 bool isCompilationUnit(); |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
978 int get resolutionState; | 983 int get resolutionState; |
979 Token get beginToken; | 984 Token get beginToken; |
980 Token get endToken; | 985 Token get endToken; |
981 | 986 |
982 // TODO(kasperl): Try to get rid of these. | 987 // TODO(kasperl): Try to get rid of these. |
983 void set annotatedElement(Element value); | 988 void set annotatedElement(Element value); |
984 void set resolutionState(int value); | 989 void set resolutionState(int value); |
985 | 990 |
986 MetadataAnnotation ensureResolved(Compiler compiler); | 991 MetadataAnnotation ensureResolved(Compiler compiler); |
987 } | 992 } |
OLD | NEW |