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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Issue 2888823004: Remove async modifier from outlines (Closed)
Patch Set: Created 3 years, 7 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/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");
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698