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 |