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

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

Issue 2982033002: Rename FunctionDeclaration to LocalFunctionDeclaration. (Closed)
Patch Set: Documentation tweak. Created 3 years, 5 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
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/listener.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 48c36634c697d838c86c4f3041a5c7920292ea3f..9cb0b431061cb4d990d00a2eb51ee863f50aa65f 100644
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
@@ -1328,7 +1328,7 @@ class Parser {
if (looksLikeFunctionBody(getClose(afterId).next)) {
// We are looking at `type identifier '(' ... ')'` followed
// `( '{' | '=>' | 'async' | 'sync' )`.
- return parseFunctionDeclaration(begin);
+ return parseLocalFunctionDeclaration(begin);
}
} else if (identical(afterIdKind, LT_TOKEN)) {
// We are looking at `type identifier '<'`.
@@ -1338,7 +1338,7 @@ class Parser {
if (looksLikeFunctionBody(getClose(afterTypeVariables).next)) {
// We are looking at "type identifier '<' ... '>' '(' ... ')'"
// followed by '{', '=>', 'async', or 'sync'.
- return parseFunctionDeclaration(begin);
+ return parseLocalFunctionDeclaration(begin);
}
}
}
@@ -1349,14 +1349,14 @@ class Parser {
return parseLabeledStatement(token);
} else if (optional('(', token.next)) {
if (looksLikeFunctionBody(getClose(token.next).next)) {
- return parseFunctionDeclaration(token);
+ return parseLocalFunctionDeclaration(token);
}
} else if (optional('<', token.next)) {
Token afterTypeVariables = getClose(token.next)?.next;
if (afterTypeVariables != null &&
optional("(", afterTypeVariables)) {
if (looksLikeFunctionBody(getClose(afterTypeVariables).next)) {
- return parseFunctionDeclaration(token);
+ return parseLocalFunctionDeclaration(token);
}
}
// Fall through to expression statement.
@@ -2460,8 +2460,8 @@ class Parser {
return isBlock ? token.next : token;
}
- Token parseFunctionDeclaration(Token token) {
- listener.beginFunctionDeclaration(token);
+ Token parseLocalFunctionDeclaration(Token token) {
+ listener.beginLocalFunctionDeclaration(token);
Token beginToken = token;
token = parseModifiers(token, MemberKind.Local);
listener.beginFunctionName(token);
@@ -2477,7 +2477,7 @@ class Parser {
token = parseFunctionBody(token, false, true);
asyncState = savedAsyncModifier;
token = token.next;
- listener.endFunctionDeclaration(token);
+ listener.endLocalFunctionDeclaration(token);
return token;
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/listener.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698