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

Unified Diff: pkg/fasta/lib/src/source/diet_parser.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/kernel/body_builder.dart ('k') | pkg/fasta/lib/src/source/scope_listener.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/fasta/lib/src/source/diet_parser.dart
diff --git a/pkg/fasta/lib/src/source/diet_parser.dart b/pkg/fasta/lib/src/source/diet_parser.dart
index 5f1640a64a4df470f2bdffac5c53c25a7eb56fd8..0c52154cbb0c4c053718b81722b615bde34a9c36 100644
--- a/pkg/fasta/lib/src/source/diet_parser.dart
+++ b/pkg/fasta/lib/src/source/diet_parser.dart
@@ -31,10 +31,10 @@ class DietParser extends ClassMemberParser {
listener.beginOptionalFormalParameters(token);
if (!optional('(', token)) {
if (optional(';', token)) {
- listener.reportError(token, ErrorKind.ExpectedOpenParens);
+ reportRecoverableError(token, ErrorKind.ExpectedOpenParens, {});
return token;
}
- return listener.unexpected(token);
+ return reportUnrecoverableError(token, ErrorKind.UnexpectedToken);
}
BeginGroupToken beginGroupToken = token;
Token endToken = beginGroupToken.endGroup;
« no previous file with comments | « pkg/fasta/lib/src/kernel/body_builder.dart ('k') | pkg/fasta/lib/src/source/scope_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698