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

Unified Diff: pkg/front_end/lib/src/fasta/parser/parser.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/parser/parser.dart
diff --git a/pkg/front_end/lib/src/fasta/parser/parser.dart b/pkg/front_end/lib/src/fasta/parser/parser.dart
index 61d741736f90a986b8357baf92a8c2f4c87753c3..d7ed9c1a84c177005158c79692e098b079679eb4 100644
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
@@ -2009,9 +2009,9 @@ class Parser {
token = parseExpression(token.next);
if (!isExpression) {
expectSemicolon(token);
- listener.endReturnStatement(true, begin, token);
+ listener.endExpressionFunctionBody(begin, token);
} else {
- listener.endReturnStatement(true, begin, null);
+ listener.endExpressionFunctionBody(begin, null);
}
return token;
} else if (optional('=', token)) {
@@ -2021,9 +2021,9 @@ class Parser {
token = parseExpression(token.next);
if (!isExpression) {
expectSemicolon(token);
- listener.endReturnStatement(true, begin, token);
+ listener.endExpressionFunctionBody(begin, token);
} else {
- listener.endReturnStatement(true, begin, null);
+ listener.endExpressionFunctionBody(begin, null);
}
return token;
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/listener.dart ('k') | pkg/front_end/lib/src/fasta/source/diet_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698