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 '../constants/expressions.dart'; | 8 import '../constants/expressions.dart'; |
9 import '../helpers/helpers.dart'; // Included for debug helpers. | 9 import '../helpers/helpers.dart'; // Included for debug helpers. |
10 import '../tree/tree.dart'; | 10 import '../tree/tree.dart'; |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 CompilationUnitElement get compilationUnit { | 161 CompilationUnitElement get compilationUnit { |
162 Element element = this; | 162 Element element = this; |
163 while (!element.isCompilationUnit) { | 163 while (!element.isCompilationUnit) { |
164 element = element.enclosingElement; | 164 element = element.enclosingElement; |
165 } | 165 } |
166 return element; | 166 return element; |
167 } | 167 } |
168 | 168 |
169 LibraryElement get library => enclosingElement.library; | 169 LibraryElement get library => enclosingElement.library; |
170 | 170 |
| 171 Name get memberName => new Name(name, library); |
| 172 |
171 LibraryElement get implementationLibrary { | 173 LibraryElement get implementationLibrary { |
172 Element element = this; | 174 Element element = this; |
173 while (!identical(element.kind, ElementKind.LIBRARY)) { | 175 while (!identical(element.kind, ElementKind.LIBRARY)) { |
174 element = element.enclosingElement; | 176 element = element.enclosingElement; |
175 } | 177 } |
176 return element; | 178 return element; |
177 } | 179 } |
178 | 180 |
179 ClassElement get enclosingClass { | 181 ClassElement get enclosingClass { |
180 for (Element e = this; e != null; e = e.enclosingElement) { | 182 for (Element e = this; e != null; e = e.enclosingElement) { |
(...skipping 2887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3068 AstElement get definingElement; | 3070 AstElement get definingElement; |
3069 | 3071 |
3070 bool get hasResolvedAst => definingElement.hasTreeElements; | 3072 bool get hasResolvedAst => definingElement.hasTreeElements; |
3071 | 3073 |
3072 ResolvedAst get resolvedAst { | 3074 ResolvedAst get resolvedAst { |
3073 return new ResolvedAst(declaration, | 3075 return new ResolvedAst(declaration, |
3074 definingElement.node, definingElement.treeElements); | 3076 definingElement.node, definingElement.treeElements); |
3075 } | 3077 } |
3076 | 3078 |
3077 } | 3079 } |
OLD | NEW |