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

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

Issue 2664333003: Throw input error instead of parser error to avoid crashing. (Closed)
Patch Set: Updated status files. 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 | « no previous file | pkg/front_end/test/fasta/compile.status » ('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/stack_listener.dart
diff --git a/pkg/front_end/lib/src/fasta/source/stack_listener.dart b/pkg/front_end/lib/src/fasta/source/stack_listener.dart
index 1438a2e19e66e2ec12d5ecef0647ab9c2aac4ab6..0e03ae66ec42dd0d9141cf5eae139191bcf978ce 100644
--- a/pkg/front_end/lib/src/fasta/source/stack_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/stack_listener.dart
@@ -232,4 +232,9 @@ abstract class StackListener extends Listener {
super.handleRecoverableError(token, kind, arguments);
debugEvent("Error: ${recoverableErrors.last}");
}
+
+ @override
+ Token handleUnrecoverableError(Token token, ErrorKind kind, Map arguments) {
+ throw inputError(uri, token.charOffset, "$kind $arguments");
+ }
}
« no previous file with comments | « no previous file | pkg/front_end/test/fasta/compile.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698