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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 * minified Dart and JavaScript code in one go. Also, we're planning | 175 * minified Dart and JavaScript code in one go. Also, we're planning |
176 * on adding an incremental compilation server that should be able to | 176 * on adding an incremental compilation server that should be able to |
177 * reuse elements between compilations. So to keep things simple, it | 177 * reuse elements between compilations. So to keep things simple, it |
178 * is best if the backends avoid setting state directly in elements. | 178 * is best if the backends avoid setting state directly in elements. |
179 * It is better to keep such state in a table on the side. | 179 * It is better to keep such state in a table on the side. |
180 */ | 180 */ |
181 abstract class Element implements Entity { | 181 abstract class Element implements Entity { |
182 String get name; | 182 String get name; |
183 ElementKind get kind; | 183 ElementKind get kind; |
184 Element get enclosingElement; | 184 Element get enclosingElement; |
185 Link<MetadataAnnotation> get metadata; | 185 Iterable<MetadataAnnotation> get metadata; |
186 | 186 |
187 /// `true` if this element is a library. | 187 /// `true` if this element is a library. |
188 bool get isLibrary; | 188 bool get isLibrary; |
189 | 189 |
190 /// `true` if this element is a compilation unit. | 190 /// `true` if this element is a compilation unit. |
191 bool get isCompilationUnit; | 191 bool get isCompilationUnit; |
192 | 192 |
193 /// `true` if this element is defines the scope of prefix used by one or | 193 /// `true` if this element is defines the scope of prefix used by one or |
194 /// more import declarations. | 194 /// more import declarations. |
195 bool get isPrefix; | 195 bool get isPrefix; |
(...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1653 bool get isDeclaredByField; | 1653 bool get isDeclaredByField; |
1654 | 1654 |
1655 /// Returns `true` if this member is abstract. | 1655 /// Returns `true` if this member is abstract. |
1656 bool get isAbstract; | 1656 bool get isAbstract; |
1657 | 1657 |
1658 /// If abstract, [implementation] points to the overridden concrete member, | 1658 /// If abstract, [implementation] points to the overridden concrete member, |
1659 /// if any. Otherwise [implementation] points to the member itself. | 1659 /// if any. Otherwise [implementation] points to the member itself. |
1660 Member get implementation; | 1660 Member get implementation; |
1661 } | 1661 } |
1662 | 1662 |
OLD | NEW |