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 '../common.dart'; | 7 import '../common.dart'; |
8 import '../common/names.dart' show Identifiers; | 8 import '../common/names.dart' show Identifiers; |
9 import '../common/resolution.dart' show Resolution, ParsingContext; | 9 import '../common/resolution.dart' show Resolution, ParsingContext; |
10 import '../compiler.dart' show Compiler; | 10 import '../compiler.dart' show Compiler; |
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 LibraryElement get importedLibrary => libraryDependency; | 938 LibraryElement get importedLibrary => libraryDependency; |
939 | 939 |
940 @override | 940 @override |
941 accept(ElementVisitor visitor, arg) => visitor.visitImportElement(this, arg); | 941 accept(ElementVisitor visitor, arg) => visitor.visitImportElement(this, arg); |
942 | 942 |
943 @override | 943 @override |
944 bool get isDeferred => node.isDeferred; | 944 bool get isDeferred => node.isDeferred; |
945 } | 945 } |
946 | 946 |
947 class SyntheticImportElement extends ImportElementX { | 947 class SyntheticImportElement extends ImportElementX { |
948 SyntheticImportElement(CompilationUnitElement enclosingElement, Uri uri) | 948 SyntheticImportElement(CompilationUnitElement enclosingElement, Uri uri, |
949 : super(enclosingElement, null, uri); | 949 LibraryElement libraryDependency) |
| 950 : super(enclosingElement, null, uri) { |
| 951 this.libraryDependency = libraryDependency; |
| 952 } |
950 | 953 |
951 @override | 954 @override |
952 Token get position => library.position; | 955 Token get position => library.position; |
953 | 956 |
954 @override | 957 @override |
955 bool get isSynthesized => true; | 958 bool get isSynthesized => true; |
956 | 959 |
957 @override | 960 @override |
958 bool get isDeferred => false; | 961 bool get isDeferred => false; |
959 | 962 |
(...skipping 2425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3385 body = node.asFunctionExpression().body; | 3388 body = node.asFunctionExpression().body; |
3386 } | 3389 } |
3387 return new ParsedResolvedAst( | 3390 return new ParsedResolvedAst( |
3388 declaration, | 3391 declaration, |
3389 node, | 3392 node, |
3390 body, | 3393 body, |
3391 definingElement.treeElements, | 3394 definingElement.treeElements, |
3392 definingElement.compilationUnit.script.resourceUri); | 3395 definingElement.compilationUnit.script.resourceUri); |
3393 } | 3396 } |
3394 } | 3397 } |
OLD | NEW |