Index: pkg/front_end/lib/src/fasta/source/outline_builder.dart |
diff --git a/pkg/front_end/lib/src/fasta/source/outline_builder.dart b/pkg/front_end/lib/src/fasta/source/outline_builder.dart |
index 047524e76fea50667c396de2f814fe1e620ab264..5f01274ac372eba64136889fb58f675d4620bf24 100644 |
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart |
@@ -28,8 +28,7 @@ import 'source_library_builder.dart' show SourceLibraryBuilder; |
import 'unhandled_listener.dart' show NullValue, Unhandled, UnhandledListener; |
-import '../parser/native_support.dart' |
- show extractNativeMethodName, removeNativeClause, skipNativeClause; |
+import '../parser/dart_vm_native.dart' show removeNativeClause; |
import '../operator.dart' |
show |
@@ -50,7 +49,6 @@ class OutlineBuilder extends UnhandledListener { |
final SourceLibraryBuilder library; |
final bool enableNative; |
- final bool stringExpectedAfterNative; |
/// When true, recoverable parser errors are silently ignored. This is |
/// because they will be reported by the BodyBuilder later. However, typedefs |
@@ -62,10 +60,7 @@ class OutlineBuilder extends UnhandledListener { |
OutlineBuilder(SourceLibraryBuilder library) |
: library = library, |
- enableNative = |
- library.loader.target.backendTarget.enableNative(library.uri), |
- stringExpectedAfterNative = |
- library.loader.target.backendTarget.nativeExtensionExpectsString; |
+ enableNative = library.loader.target.enableNative(library); |
@override |
Uri get uri => library.fileUri; |
@@ -854,10 +849,10 @@ class OutlineBuilder extends UnhandledListener { |
@override |
Token handleUnrecoverableError(Token token, FastaMessage message) { |
if (enableNative && message.code == codeExpectedBlockToSkip) { |
- Token recover = skipNativeClause(token, stringExpectedAfterNative); |
+ var target = library.loader.target; |
+ Token recover = target.skipNativeClause(token); |
if (recover != null) { |
- nativeMethodName = |
- stringExpectedAfterNative ? extractNativeMethodName(token) : ""; |
+ nativeMethodName = target.extractNativeMethodName(token); |
return recover; |
} |
} |
@@ -873,7 +868,7 @@ class OutlineBuilder extends UnhandledListener { |
@override |
Link<Token> handleMemberName(Link<Token> identifiers) { |
if (!enableNative || identifiers.isEmpty) return identifiers; |
- return removeNativeClause(identifiers, stringExpectedAfterNative); |
+ return removeNativeClause(identifiers); |
} |
@override |