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

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

Issue 2968093003: Improve parsing of function expressions. (Closed)
Patch Set: 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
Index: pkg/front_end/lib/src/fasta/parser/listener.dart
diff --git a/pkg/front_end/lib/src/fasta/parser/listener.dart b/pkg/front_end/lib/src/fasta/parser/listener.dart
index 503f00f7c88cbd4e4d8ad6d1aa996d2a82011096..0074507be655898cf6e79c6b61b92d4044f58bbe 100644
--- a/pkg/front_end/lib/src/fasta/parser/listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/listener.dart
@@ -254,15 +254,15 @@ class Listener {
logEvent("ForInBody");
}
- void beginFunction(Token token) {}
+ void beginNamedFunctionExpression(Token token) {}
- void endFunction(Token getOrSet, Token endToken) {
- logEvent("Function");
+ void endNamedFunctionExpression(Token endToken) {
danrubel 2017/07/06 15:43:34 dartdoc? indicate substructures?
ahe 2017/07/06 19:54:18 Done.
+ logEvent("NamedFunctionExpression");
}
void beginFunctionDeclaration(Token token) {}
- void endFunctionDeclaration(Token token) {
+ void endFunctionDeclaration(Token endToken) {
logEvent("FunctionDeclaration");
}
@@ -776,7 +776,7 @@ class Listener {
logEvent("TypeVariables");
}
- void beginUnnamedFunction(Token token) {}
+ void beginFunctionExpression(Token token) {}
/// Handle the end of a function expression (e.g. "() { ... }").
/// Substructures:
@@ -784,8 +784,8 @@ class Listener {
/// - Formal parameters
/// - Async marker
/// - Body
- void endUnnamedFunction(Token beginToken, Token token) {
- logEvent("UnnamedFunction");
+ void endFunctionExpression(Token beginToken, Token token) {
+ logEvent("FunctionExpression");
}
void beginVariablesDeclaration(Token token) {}

Powered by Google App Engine
This is Rietveld 408576698