| 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 '../constants/expressions.dart'; | 8 import '../constants/expressions.dart'; |
| 9 import '../tree/tree.dart'; | 9 import '../tree/tree.dart'; |
| 10 import '../util/util.dart'; | 10 import '../util/util.dart'; |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 void setNative(String name); | 415 void setNative(String name); |
| 416 | 416 |
| 417 Scope buildScope(); | 417 Scope buildScope(); |
| 418 | 418 |
| 419 void diagnose(Element context, DiagnosticListener listener); | 419 void diagnose(Element context, DiagnosticListener listener); |
| 420 | 420 |
| 421 // TODO(johnniwinther): Move this to [AstElement]. | 421 // TODO(johnniwinther): Move this to [AstElement]. |
| 422 /// Returns the [Element] that holds the [TreeElements] for this element. | 422 /// Returns the [Element] that holds the [TreeElements] for this element. |
| 423 AnalyzableElement get analyzableElement; | 423 AnalyzableElement get analyzableElement; |
| 424 | 424 |
| 425 accept(ElementVisitor visitor); | 425 accept(ElementVisitor visitor, arg); |
| 426 } | 426 } |
| 427 | 427 |
| 428 class Elements { | 428 class Elements { |
| 429 static bool isUnresolved(Element e) { | 429 static bool isUnresolved(Element e) { |
| 430 return e == null || e.isErroneous; | 430 return e == null || e.isErroneous; |
| 431 } | 431 } |
| 432 static bool isErroneous(Element e) => e != null && e.isErroneous; | 432 static bool isErroneous(Element e) => e != null && e.isErroneous; |
| 433 | 433 |
| 434 /// Unwraps [element] reporting any warnings attached to it, if any. | 434 /// Unwraps [element] reporting any warnings attached to it, if any. |
| 435 static Element unwrap(Element element, | 435 static Element unwrap(Element element, |
| (...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1626 bool get isDeclaredByField; | 1626 bool get isDeclaredByField; |
| 1627 | 1627 |
| 1628 /// Returns `true` if this member is abstract. | 1628 /// Returns `true` if this member is abstract. |
| 1629 bool get isAbstract; | 1629 bool get isAbstract; |
| 1630 | 1630 |
| 1631 /// If abstract, [implementation] points to the overridden concrete member, | 1631 /// If abstract, [implementation] points to the overridden concrete member, |
| 1632 /// if any. Otherwise [implementation] points to the member itself. | 1632 /// if any. Otherwise [implementation] points to the member itself. |
| 1633 Member get implementation; | 1633 Member get implementation; |
| 1634 } | 1634 } |
| 1635 | 1635 |
| OLD | NEW |