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

Unified Diff: pkg/front_end/lib/src/fasta/source/source_loader.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
Index: pkg/front_end/lib/src/fasta/source/source_loader.dart
diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart
index 29a94b6ddb4c5d7f5047c1de283312a1ec47fca6..f50f8ddbd87ddfed8edba92588b2a2a5a0dd566d 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -79,14 +79,9 @@ class SourceLoader<L> extends Loader<L> {
Future<Token> tokenize(SourceLibraryBuilder library,
{bool suppressLexicalErrors: false}) async {
- Uri uri = library.fileUri ?? library.uri;
- if (uri.scheme != "file") {
- uri = target.translateUri(uri);
- if (uri == null) {
- print("Skipping ${library.uri}");
- return null;
- }
- library.fileUri = uri;
+ Uri uri = library.fileUri;
+ if (uri == null || uri.scheme != "file") {
+ return inputError(library.uri, -1, "Not found: ${library.uri}.");
}
try {
List<int> bytes = await readBytesFromFile(uri);
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/source_library_builder.dart ('k') | pkg/front_end/lib/src/fasta/target_implementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698