Chromium Code Reviews| 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('../tree/tree.dart'); | 7 #import('../tree/tree.dart'); |
| 8 #import('../scanner/scannerlib.dart'); | 8 #import('../scanner/scannerlib.dart'); |
| 9 #import('../leg.dart'); // TODO(karlklose): we only need type. | 9 #import('../leg.dart'); // TODO(karlklose): we only need type. |
| 10 #import('../util/util.dart'); | 10 #import('../util/util.dart'); |
| (...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 756 /** | 756 /** |
| 757 * Returns the super class, if any. | 757 * Returns the super class, if any. |
| 758 * | 758 * |
| 759 * The returned element may not be resolved yet. | 759 * The returned element may not be resolved yet. |
| 760 */ | 760 */ |
| 761 ClassElement get superclass() { | 761 ClassElement get superclass() { |
| 762 assert(isResolved); | 762 assert(isResolved); |
| 763 return supertype === null ? null : supertype.element; | 763 return supertype === null ? null : supertype.element; |
| 764 } | 764 } |
| 765 | 765 |
| 766 bool isInterface() => false; | 766 bool isInterface() => true; |
|
ngeoffray
2012/03/19 11:48:01
? What is this for? I believe the original false r
ahe
2012/03/19 15:31:09
Done.
| |
| 767 bool isNative() => nativeName != null; | 767 bool isNative() => nativeName != null; |
| 768 SourceString nativeName; | 768 SourceString nativeName; |
| 769 } | 769 } |
| 770 | 770 |
| 771 class Elements { | 771 class Elements { |
| 772 static bool isLocal(Element element) { | 772 static bool isLocal(Element element) { |
| 773 return ((element !== null) | 773 return ((element !== null) |
| 774 && !element.isInstanceMember() | 774 && !element.isInstanceMember() |
| 775 && !isStaticOrTopLevelField(element) | 775 && !isStaticOrTopLevelField(element) |
| 776 && !isStaticOrTopLevelFunction(element) | 776 && !isStaticOrTopLevelFunction(element) |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 931 final Node node; | 931 final Node node; |
| 932 Type bound; | 932 Type bound; |
| 933 Type type; | 933 Type type; |
| 934 TypeVariableElement(name, Element enclosing, this.node, this.type, | 934 TypeVariableElement(name, Element enclosing, this.node, this.type, |
| 935 [this.bound]) | 935 [this.bound]) |
| 936 : super(name, ElementKind.TYPE_VARIABLE, enclosing); | 936 : super(name, ElementKind.TYPE_VARIABLE, enclosing); |
| 937 Type computeType(compiler) => type; | 937 Type computeType(compiler) => type; |
| 938 Node parseNode(compiler) => node; | 938 Node parseNode(compiler) => node; |
| 939 toString() => "${enclosingElement.toString()}.${name.slowToString()}"; | 939 toString() => "${enclosingElement.toString()}.${name.slowToString()}"; |
| 940 } | 940 } |
| OLD | NEW |