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; |