| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 260 |
| 261 TreeElements get treeElements => analyzableElement.treeElements; | 261 TreeElements get treeElements => analyzableElement.treeElements; |
| 262 | 262 |
| 263 AnalyzableElement get analyzableElement { | 263 AnalyzableElement get analyzableElement { |
| 264 Element element = outermostEnclosingMemberOrTopLevel; | 264 Element element = outermostEnclosingMemberOrTopLevel; |
| 265 if (element.isAbstractField || element.isPrefix) return element.library; | 265 if (element.isAbstractField || element.isPrefix) return element.library; |
| 266 return element; | 266 return element; |
| 267 } | 267 } |
| 268 | 268 |
| 269 DeclarationSite get declarationSite => null; | 269 DeclarationSite get declarationSite => null; |
| 270 |
| 271 void reuseElement() { |
| 272 throw "reuseElement isn't implemented on ${runtimeType}."; |
| 273 } |
| 270 } | 274 } |
| 271 | 275 |
| 272 class ErroneousElementX extends ElementX implements ErroneousElement { | 276 class ErroneousElementX extends ElementX implements ErroneousElement { |
| 273 final MessageKind messageKind; | 277 final MessageKind messageKind; |
| 274 final Map messageArguments; | 278 final Map messageArguments; |
| 275 | 279 |
| 276 ErroneousElementX(this.messageKind, this.messageArguments, | 280 ErroneousElementX(this.messageKind, this.messageArguments, |
| 277 String name, Element enclosing) | 281 String name, Element enclosing) |
| 278 : super(name, ElementKind.ERROR, enclosing); | 282 : super(name, ElementKind.ERROR, enclosing); |
| 279 | 283 |
| (...skipping 2432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2712 AstElement get definingElement; | 2716 AstElement get definingElement; |
| 2713 | 2717 |
| 2714 bool get hasResolvedAst => definingElement.hasTreeElements; | 2718 bool get hasResolvedAst => definingElement.hasTreeElements; |
| 2715 | 2719 |
| 2716 ResolvedAst get resolvedAst { | 2720 ResolvedAst get resolvedAst { |
| 2717 return new ResolvedAst(declaration, | 2721 return new ResolvedAst(declaration, |
| 2718 definingElement.node, definingElement.treeElements); | 2722 definingElement.node, definingElement.treeElements); |
| 2719 } | 2723 } |
| 2720 | 2724 |
| 2721 } | 2725 } |
| OLD | NEW |