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

Unified Diff: pkg/compiler/lib/src/parser/element_listener.dart

Issue 2650413002: Don't attempt to recover from missing strings. (Closed)
Patch Set: Ensure --dart2js-batch is true in all configurations and prevent recursion. Created 3 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 | « .packages ('k') | pkg/fasta/test/dart2js_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/parser/element_listener.dart
diff --git a/pkg/compiler/lib/src/parser/element_listener.dart b/pkg/compiler/lib/src/parser/element_listener.dart
index 10fd6980d01f91b6627acbcadc00f64121ced301..11d710850dc3b9f331385a7ccfb1aff63fa668fa 100644
--- a/pkg/compiler/lib/src/parser/element_listener.dart
+++ b/pkg/compiler/lib/src/parser/element_listener.dart
@@ -612,8 +612,10 @@ class ElementListener extends Listener {
break;
case ErrorKind.ExpectedString:
- errorCode = MessageKind.STRING_EXPECTED;
- break;
+ reportFatalError(
+ reporter.spanFromToken(token),
+ "Expected a String, but got '${token.value}'.");
+ return null;
case ErrorKind.ExtraneousModifier:
errorCode = MessageKind.EXTRANEOUS_MODIFIER;
« no previous file with comments | « .packages ('k') | pkg/fasta/test/dart2js_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698