Chromium Code Reviews| Index: pkg/front_end/lib/src/fasta/source/source_library_builder.dart |
| diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart |
| index 162005275381264723e78ae382a7f3f7f62cf6e4..ff76a249a3869556911a9af79f2b5db50fc599c8 100644 |
| --- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart |
| +++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart |
| @@ -17,6 +17,7 @@ import '../builder/builder.dart' |
| ConstructorReferenceBuilder, |
| FormalParameterBuilder, |
| FunctionTypeBuilder, |
| + InvalidTypeBuilder, |
| LibraryBuilder, |
| MemberBuilder, |
| MetadataBuilder, |
| @@ -96,6 +97,12 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R> |
| bool canAddImplementationBuilders = false; |
| + /// Exports in addition to the members declared in this library. |
| + /// |
| + /// Each entry in the list is a pair of library URI and name of exported |
| + /// element. |
| + List<List<String>> additionalExports; |
| + |
| SourceLibraryBuilder(SourceLoader loader, Uri fileUri) |
| : this.fromScopes(loader, fileUri, new DeclarationBuilder<T>.library(), |
| new Scope.top()); |
| @@ -512,6 +519,19 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R> |
| addToScope(name, member, -1, true); |
| }); |
| } |
| + exportScope.forEach((String name, Builder member) { |
| + if (member.parent != this) { |
| + additionalExports ??= <List<String>>[]; |
| + Builder parent = member.parent; |
| + if (parent is LibraryBuilder) { |
| + additionalExports.add(<String>["${parent.uri}", name]); |
|
Johnni Winther
2017/08/25 11:20:42
Add a TODO here for the absolute name problem ment
|
| + } else { |
| + InvalidTypeBuilder invalidType = member; |
| + String message = invalidType.message.message; |
| + additionalExports.add(<String>[null, name, message]); |
| + } |
| + } |
| + }); |
| } |
| @override |