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

Unified Diff: dart/lib/compiler/implementation/scanner/scanner_task.dart

Issue 10382195: Don't report an internal error if attempting to compile a file that doesn't exist. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 7 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 | « dart/lib/compiler/implementation/dart2js.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/scanner/scanner_task.dart
diff --git a/dart/lib/compiler/implementation/scanner/scanner_task.dart b/dart/lib/compiler/implementation/scanner/scanner_task.dart
index 19a782e778a28104d3640ef7d6464710d812f24d..483704734d9b4b43d490db320038dcccda05fc67 100644
--- a/dart/lib/compiler/implementation/scanner/scanner_task.dart
+++ b/dart/lib/compiler/implementation/scanner/scanner_task.dart
@@ -57,7 +57,7 @@ class ScannerTask extends CompilerTask {
}
} else if (tag.isSource()) {
tagState = checkTag(TagState.SOURCE, tag);
- Script script = compiler.readScript(resolved, tag);
+ Script script = compiler.readScript(resolved, argument);
CompilationUnitElement unit =
new CompilationUnitElement(script, library);
compiler.withCurrentElement(unit, () => scan(unit));
@@ -80,7 +80,7 @@ class ScannerTask extends CompilerTask {
if (resolved.toString() == "dart:core") {
implicitlyImportCoreLibrary = false;
}
- importLibrary(library, loadLibrary(resolved, tag), tag);
+ importLibrary(library, loadLibrary(resolved, argument), tag);
}
if (implicitlyImportCoreLibrary) {
importLibrary(library, compiler.coreLibrary, null);
@@ -113,7 +113,7 @@ class ScannerTask extends CompilerTask {
}
}
- LibraryElement loadLibrary(Uri uri, ScriptTag node) {
+ LibraryElement loadLibrary(Uri uri, Node node) {
bool newLibrary = false;
LibraryElement library =
compiler.universe.libraries.putIfAbsent(uri.toString(), () {
@@ -134,7 +134,7 @@ class ScannerTask extends CompilerTask {
ScriptTag tag) {
if (!imported.hasLibraryName()) {
compiler.withCurrentElement(library, () {
- compiler.reportError(tag,
+ compiler.reportError(tag === null ? null : tag.argument,
'no #library tag found in ${imported.script.uri}');
});
}
« no previous file with comments | « dart/lib/compiler/implementation/dart2js.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698