Index: pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
index 58d2262e839b305f88b16bac29a7114257b64192..77cb65931e6ecd16363a22826808674466ff1ae2 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
@@ -55,8 +55,6 @@ import '../source/scope_listener.dart' |
import '../scope.dart' show ProblemBuilder; |
-import '../source/outline_builder.dart' show asyncMarkerFromTokens; |
- |
import 'fasta_accessors.dart'; |
import '../quote.dart' |
@@ -3145,3 +3143,23 @@ String getNodeName(Object node) { |
return internalError("Unhandled: ${node.runtimeType}"); |
} |
} |
+ |
+AsyncMarker asyncMarkerFromTokens(Token asyncToken, Token starToken) { |
+ if (asyncToken == null || identical(asyncToken.stringValue, "sync")) { |
+ if (starToken == null) { |
+ return AsyncMarker.Sync; |
+ } else { |
+ assert(identical(starToken.stringValue, "*")); |
+ return AsyncMarker.SyncStar; |
+ } |
+ } else if (identical(asyncToken.stringValue, "async")) { |
+ if (starToken == null) { |
+ return AsyncMarker.Async; |
+ } else { |
+ assert(identical(starToken.stringValue, "*")); |
+ return AsyncMarker.AsyncStar; |
+ } |
+ } else { |
+ return internalError("Unknown async modifier: $asyncToken"); |
+ } |
+} |