| 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 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1224 class LocalVariableElementX extends VariableElementX | 1224 class LocalVariableElementX extends VariableElementX |
| 1225 implements LocalVariableElement { | 1225 implements LocalVariableElement { |
| 1226 LocalVariableElementX(String name, | 1226 LocalVariableElementX(String name, |
| 1227 ExecutableElement enclosingElement, | 1227 ExecutableElement enclosingElement, |
| 1228 VariableList variables, | 1228 VariableList variables, |
| 1229 Token token) | 1229 Token token) |
| 1230 : super(name, ElementKind.VARIABLE, enclosingElement, variables, token) { | 1230 : super(name, ElementKind.VARIABLE, enclosingElement, variables, token) { |
| 1231 createDefinitions(variables.definitions); | 1231 createDefinitions(variables.definitions); |
| 1232 } | 1232 } |
| 1233 | 1233 |
| 1234 // TODO(johnniwinther): Remove this when the dart `backend_ast` does not need | |
| 1235 // [Element] for entities. | |
| 1236 LocalVariableElementX.synthetic(String name, | |
| 1237 ExecutableElement enclosingElement, | |
| 1238 VariableList variables) | |
| 1239 : super(name, ElementKind.VARIABLE, enclosingElement, variables, null); | |
| 1240 | |
| 1241 ExecutableElement get executableContext => enclosingElement; | 1234 ExecutableElement get executableContext => enclosingElement; |
| 1242 | 1235 |
| 1243 ExecutableElement get memberContext => executableContext.memberContext; | 1236 ExecutableElement get memberContext => executableContext.memberContext; |
| 1244 | 1237 |
| 1245 bool get isLocal => true; | 1238 bool get isLocal => true; |
| 1246 } | 1239 } |
| 1247 | 1240 |
| 1248 class FieldElementX extends VariableElementX | 1241 class FieldElementX extends VariableElementX |
| 1249 with AnalyzableElementX implements FieldElement { | 1242 with AnalyzableElementX implements FieldElement { |
| 1250 List<FunctionElement> nestedClosures = new List<FunctionElement>(); | 1243 List<FunctionElement> nestedClosures = new List<FunctionElement>(); |
| (...skipping 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2716 AstElement get definingElement; | 2709 AstElement get definingElement; |
| 2717 | 2710 |
| 2718 bool get hasResolvedAst => definingElement.hasTreeElements; | 2711 bool get hasResolvedAst => definingElement.hasTreeElements; |
| 2719 | 2712 |
| 2720 ResolvedAst get resolvedAst { | 2713 ResolvedAst get resolvedAst { |
| 2721 return new ResolvedAst(declaration, | 2714 return new ResolvedAst(declaration, |
| 2722 definingElement.node, definingElement.treeElements); | 2715 definingElement.node, definingElement.treeElements); |
| 2723 } | 2716 } |
| 2724 | 2717 |
| 2725 } | 2718 } |
| OLD | NEW |