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

Unified Diff: dart/pkg/compiler/lib/src/scanner/scanner_task.dart

Issue 808953004: Recover from fatal parser errors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r42860. Created 5 years, 11 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/pkg/compiler/lib/src/scanner/parser_task.dart ('k') | dart/pkg/compiler/lib/src/use_unused_api.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/pkg/compiler/lib/src/scanner/scanner_task.dart
diff --git a/dart/pkg/compiler/lib/src/scanner/scanner_task.dart b/dart/pkg/compiler/lib/src/scanner/scanner_task.dart
index ccfbc0edc499d511857d5676810d5ef64490e9cf..ac560cbd9e955466e3e2a92f2d017bfc287e7034 100644
--- a/dart/pkg/compiler/lib/src/scanner/scanner_task.dart
+++ b/dart/pkg/compiler/lib/src/scanner/scanner_task.dart
@@ -61,7 +61,11 @@ class DietParserTask extends CompilerTask {
ElementListener listener =
new ElementListener(compiler, compilationUnit, idGenerator);
PartialParser parser = new PartialParser(listener);
- parser.parseUnit(tokens);
+ try {
+ parser.parseUnit(tokens);
+ } on ParserError catch (e) {
+ assert(invariant(compilationUnit, compiler.compilationFailed));
+ }
});
}
}
« no previous file with comments | « dart/pkg/compiler/lib/src/scanner/parser_task.dart ('k') | dart/pkg/compiler/lib/src/use_unused_api.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698