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

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

Issue 2650813002: Restructure parser error handling and recovery. (Closed)
Patch Set: Address comments. 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 | « pkg/fasta/lib/src/source/scope_listener.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/fasta/lib/src/source/stack_listener.dart
diff --git a/pkg/fasta/lib/src/source/stack_listener.dart b/pkg/fasta/lib/src/source/stack_listener.dart
index 8676854eac6398b22e6526110f659e028aa60a8d..54ac0f2a01e79748dfccdba75bf85f7355cb4811 100644
--- a/pkg/fasta/lib/src/source/stack_listener.dart
+++ b/pkg/fasta/lib/src/source/stack_listener.dart
@@ -8,6 +8,7 @@ import 'dart:collection' show
Queue;
import 'package:dart_parser/dart_parser.dart' show
+ ErrorKind,
Listener;
import 'package:dart_scanner/dart_scanner.dart' show
@@ -226,7 +227,8 @@ abstract class StackListener extends Listener {
}
@override
- void error(String message, Token token) {
- inputError(uri, token.charOffset, message);
+ void handleRecoverableError(Token token, ErrorKind kind, Map arguments) {
+ super.handleRecoverableError(token, kind, arguments);
+ debugEvent("Error: ${recoverableErrors.last}");
}
}
« no previous file with comments | « pkg/fasta/lib/src/source/scope_listener.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698