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

Unified Diff: pkg/front_end/lib/src/fasta/source/diet_listener.dart

Issue 2728773002: Fix parsing [a]sync[*] function body modifiers with Fasta. (Closed)
Patch Set: Use endExpressionFunctionBody() instead of endReturnStatement(). Created 3 years, 10 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/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 6468ff017d179346bbede9c8679f0f8ab44fde81..e31dbe93d4b463290b813773861258d1014dcfbd 100644
--- a/pkg/front_end/lib/src/fasta/source/diet_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
@@ -495,7 +495,8 @@ class DietListener extends StackListener {
listener.prepareInitializers();
token = parser.parseInitializersOpt(token);
token = parser.parseAsyncModifier(token);
- AsyncMarker asyncModifier = listener.pop();
+ AsyncMarker asyncModifier =
+ astKind == AstKind.Analyzer ? null : listener.pop();
bool isExpression = false;
bool allowAbstract = true;
parser.parseFunctionBody(token, isExpression, allowAbstract);
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/parser.dart ('k') | pkg/front_end/lib/src/fasta/source/stack_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698