Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1641)

Unified Diff: pkg/front_end/lib/src/fasta/source/source_library_builder.dart

Issue 2669363004: Set fileUri when creating library builders. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/front_end/lib/src/fasta/loader.dart ('k') | pkg/front_end/lib/src/fasta/source/source_loader.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0c0599ee470627d2c138c8b0fc3e78989d97e7be..934b98092526ce2a7b811d3fbff0ea7dd465f94b 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
@@ -62,12 +62,12 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
final Scope scope = new Scope(<String, Builder>{}, null, isModifiable: false);
+ final Uri fileUri;
+
String name;
String partOf;
- Uri fileUri;
-
List<MetadataBuilder> metadata;
Map<String, MemberBuilder> classMembers;
@@ -75,7 +75,7 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
// TODO(ahe): Rename this. It's not just for classes.
List<T> classTypes;
- SourceLibraryBuilder(this.loader);
+ SourceLibraryBuilder(this.loader, this.fileUri);
Uri get uri;
@@ -133,11 +133,7 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
} else {
newFileUri = resolvedUri = resolve(path);
}
- LibraryBuilder part = loader.read(resolvedUri);
- if (part is SourceLibraryBuilder) {
- part.fileUri ??= newFileUri;
- }
- parts.add(part);
+ parts.add(loader.read(resolvedUri, newFileUri));
}
void addPartOf(List<MetadataBuilder> metadata, String name) {
« no previous file with comments | « pkg/front_end/lib/src/fasta/loader.dart ('k') | pkg/front_end/lib/src/fasta/source/source_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698