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

Unified Diff: pkg/front_end/lib/src/fasta/source/diet_listener.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_listener.dart
diff --git a/pkg/front_end/lib/src/fasta/source/diet_listener.dart b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
index 60fa19a328df237a264d00399c61a2e598ca8e7d..0d389c88f3a34c30994564da7a2b289d2ec14742 100644
--- a/pkg/front_end/lib/src/fasta/source/diet_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
@@ -10,6 +10,8 @@ import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
import 'package:kernel/core_types.dart' show CoreTypes;
+import '../fasta_codes.dart' show FastaMessage, codeExpectedBlockToSkip;
+
import '../parser/parser.dart' show Parser, optional;
import '../scanner/token.dart' show BeginGroupToken, Token;
@@ -17,8 +19,6 @@ import '../scanner/token.dart' show BeginGroupToken, Token;
import '../parser/dart_vm_native.dart'
show removeNativeClause, skipNativeClause;
-import '../parser/error_kind.dart' show ErrorKind;
-
import '../util/link.dart' show Link;
import '../errors.dart' show Crash, InputError, inputError, internalError;
@@ -462,15 +462,15 @@ class DietListener extends StackListener {
}
@override
- Token handleUnrecoverableError(Token token, ErrorKind kind, Map arguments) {
- if (isDartLibrary && kind == ErrorKind.ExpectedBlockToSkip) {
+ Token handleUnrecoverableError(Token token, FastaMessage message) {
+ if (isDartLibrary && message.code == codeExpectedBlockToSkip) {
Token recover = skipNativeClause(token);
if (recover != null) {
assert(isTargetingDartVm);
return recover;
}
}
- return super.handleUnrecoverableError(token, kind, arguments);
+ return super.handleUnrecoverableError(token, message);
}
@override
« no previous file with comments | « pkg/front_end/lib/src/fasta/scanner/recover.dart ('k') | pkg/front_end/lib/src/fasta/source/diet_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698