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

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

Issue 2778213002: Use message.yaml in parser. (Closed)
Patch Set: Update subpackage relationships. Created 3 years, 9 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
Index: pkg/front_end/lib/src/fasta/source/diet_parser.dart
diff --git a/pkg/front_end/lib/src/fasta/source/diet_parser.dart b/pkg/front_end/lib/src/fasta/source/diet_parser.dart
index 82251320e134808dd493a41be37673ad3c933444..db223372a0412b9c7b1f7714dd42d751eb94e8ba 100644
--- a/pkg/front_end/lib/src/fasta/source/diet_parser.dart
+++ b/pkg/front_end/lib/src/fasta/source/diet_parser.dart
@@ -4,16 +4,16 @@
library fasta.diet_parser;
-import '../scanner/token.dart' show BeginGroupToken, Token;
+import '../fasta_codes.dart' show codeExpectedOpenParens;
import '../parser/class_member_parser.dart' show ClassMemberParser;
-import '../parser/error_kind.dart' show ErrorKind;
-
import '../parser/listener.dart' show Listener;
import '../parser/parser.dart' show optional;
+import '../scanner/token.dart' show BeginGroupToken, Token;
+
// TODO(ahe): Move this to parser package.
class DietParser extends ClassMemberParser {
DietParser(Listener listener) : super(listener);
@@ -26,10 +26,10 @@ class DietParser extends ClassMemberParser {
listener.beginOptionalFormalParameters(token);
if (!optional('(', token)) {
if (optional(';', token)) {
- reportRecoverableError(token, ErrorKind.ExpectedOpenParens, {});
+ reportRecoverableErrorCode(token, codeExpectedOpenParens);
return token;
}
- return reportUnrecoverableError(token, ErrorKind.UnexpectedToken)?.next;
+ return reportUnexpectedToken(token).next;
}
BeginGroupToken beginGroupToken = token;
Token endToken = beginGroupToken.endGroup;
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/diet_listener.dart ('k') | pkg/front_end/lib/src/fasta/source/outline_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698