OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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.modelx; | 5 library elements.modelx; |
6 | 6 |
7 import 'elements.dart'; | 7 import 'elements.dart'; |
8 import '../../compiler.dart' as api; | 8 import '../../compiler.dart' as api; |
9 import '../tree/tree.dart'; | 9 import '../tree/tree.dart'; |
10 import '../util/util.dart'; | 10 import '../util/util.dart'; |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 bool isForeign(Compiler compiler) => getLibrary() == compiler.foreignLibrary; | 291 bool isForeign(Compiler compiler) => getLibrary() == compiler.foreignLibrary; |
292 | 292 |
293 FunctionElement get targetConstructor => null; | 293 FunctionElement get targetConstructor => null; |
294 | 294 |
295 void diagnose(Element context, DiagnosticListener listener) {} | 295 void diagnose(Element context, DiagnosticListener listener) {} |
296 } | 296 } |
297 | 297 |
298 /** | 298 /** |
299 * Represents an unresolvable or duplicated element. | 299 * Represents an unresolvable or duplicated element. |
300 * | 300 * |
301 * An [ErroneousElement] is used instead of [null] to provide additional | 301 * An [ErroneousElement] is used instead of [:null:] to provide additional |
302 * information about the error that caused the element to be unresolvable | 302 * information about the error that caused the element to be unresolvable |
303 * or otherwise invalid. | 303 * or otherwise invalid. |
304 * | 304 * |
305 * Accessing any field or calling any method defined on [ErroneousElement] | 305 * Accessing any field or calling any method defined on [ErroneousElement] |
306 * except [isErroneous] will currently throw an exception. (This might | 306 * except [isErroneous] will currently throw an exception. (This might |
307 * change when we actually want more information on the erroneous element, | 307 * change when we actually want more information on the erroneous element, |
308 * e.g., the name of the element we were trying to resolve.) | 308 * e.g., the name of the element we were trying to resolve.) |
309 * | 309 * |
310 * Code that cannot not handle an [ErroneousElement] should use | 310 * Code that cannot not handle an [ErroneousElement] should use |
311 * [: Element.isInvalid(element) :] | 311 * [: Element.isInvalid(element) :] |
(...skipping 2136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2448 | 2448 |
2449 MetadataAnnotation ensureResolved(Compiler compiler) { | 2449 MetadataAnnotation ensureResolved(Compiler compiler) { |
2450 if (resolutionState == STATE_NOT_STARTED) { | 2450 if (resolutionState == STATE_NOT_STARTED) { |
2451 compiler.resolver.resolveMetadataAnnotation(this); | 2451 compiler.resolver.resolveMetadataAnnotation(this); |
2452 } | 2452 } |
2453 return this; | 2453 return this; |
2454 } | 2454 } |
2455 | 2455 |
2456 String toString() => 'MetadataAnnotation($value, $resolutionState)'; | 2456 String toString() => 'MetadataAnnotation($value, $resolutionState)'; |
2457 } | 2457 } |
OLD | NEW |