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

Unified Diff: pkg/front_end/lib/src/fasta/parser/parser.dart

Issue 2747853002: Rename xFunctionBody to xBlockFunctionBody. Document related listener methods. (Closed)
Patch Set: Rename to handleEmptyFunctionBody() and handleExpressionFunctionBody(). Created 3 years, 9 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 275c3ed762e596c8bcba89250244c25b719282ee..1f3c4776c62ef57f1d9c28bdd6ca5ad6e53f50d9 100644
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
@@ -2041,16 +2041,16 @@ class Parser {
if (!allowAbstract) {
reportRecoverableError(token, ErrorKind.ExpectedBody);
}
- listener.endEmptyFunctionBody(token);
+ listener.handleEmptyFunctionBody(token);
return token;
} else if (optional('=>', token)) {
Token begin = token;
token = parseExpression(token.next);
if (!isExpression) {
expectSemicolon(token);
- listener.endExpressionFunctionBody(begin, token);
+ listener.handleExpressionFunctionBody(begin, token);
} else {
- listener.endExpressionFunctionBody(begin, null);
+ listener.handleExpressionFunctionBody(begin, null);
}
return token;
} else if (optional('=', token)) {
@@ -2060,9 +2060,9 @@ class Parser {
token = parseExpression(token.next);
if (!isExpression) {
expectSemicolon(token);
- listener.endExpressionFunctionBody(begin, token);
+ listener.handleExpressionFunctionBody(begin, token);
} else {
- listener.endExpressionFunctionBody(begin, null);
+ listener.handleExpressionFunctionBody(begin, null);
}
return token;
}
@@ -2075,13 +2075,13 @@ class Parser {
return token;
}
- listener.beginFunctionBody(begin);
+ listener.beginBlockFunctionBody(begin);
token = token.next;
while (notEofOrValue('}', token)) {
token = parseStatement(token);
++statementCount;
}
- listener.endFunctionBody(statementCount, begin, token);
+ listener.endBlockFunctionBody(statementCount, begin, token);
expect('}', token);
return token;
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/listener.dart ('k') | pkg/front_end/lib/src/fasta/source/scope_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698