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 36b7c6ce224ee725fb4dad5facfd5a1bd001090b..695b5fe2e36dfd2a79775e8e16b7196c8a52d55d 100644 |
--- a/pkg/front_end/lib/src/fasta/source/diet_listener.dart |
+++ b/pkg/front_end/lib/src/fasta/source/diet_listener.dart |
@@ -22,8 +22,7 @@ import '../parser/parser.dart' show Parser, optional; |
import '../scanner/token.dart' show BeginGroupToken, Token; |
-import '../parser/dart_vm_native.dart' |
- show removeNativeClause, skipNativeClause; |
+import '../parser/dart_vm_native.dart' show removeNativeClause; |
import '../util/link.dart' show Link; |
@@ -483,11 +482,8 @@ class DietListener extends StackListener { |
@override |
Token handleUnrecoverableError(Token token, FastaMessage message) { |
if (isDartLibrary && message.code == codeExpectedBlockToSkip) { |
- Token recover = skipNativeClause(token); |
- if (recover != null) { |
- assert(isTargetingDartVm); |
- return recover; |
- } |
+ Token recover = library.loader.target.skipNativeClause(token); |
+ if (recover != null) return recover; |
} |
return super.handleUnrecoverableError(token, message); |
} |
@@ -569,11 +565,6 @@ class DietListener extends StackListener { |
return builder; |
} |
- bool get isTargetingDartVm { |
- // TODO(ahe): Find a more reliable way to check if this is the Dart VM. |
- return !coreTypes.containsLibrary("dart:_js_helper"); |
- } |
- |
@override |
void debugEvent(String name) { |
// printEvent(name); |