Chromium Code Reviews| 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 897a754608819c9a83e200cb0d84845179b09326..ecd6b7368d7c597d66c45ffe669926ea89325099 100644 |
| --- a/pkg/front_end/lib/src/fasta/parser/listener.dart |
| +++ b/pkg/front_end/lib/src/fasta/parser/listener.dart |
| @@ -342,10 +342,13 @@ class Listener { |
| void beginFieldInitializer(Token token) {} |
| + /// Handle the end of a field initializer. Substructures: |
| + /// - Initializer expression |
| void endFieldInitializer(Token assignment) { |
| logEvent("FieldInitializer"); |
| } |
| + /// Handle the lack of a field initializer. |
| void handleNoFieldInitializer(Token token) { |
| logEvent("NoFieldInitializer"); |
| } |
| @@ -549,6 +552,13 @@ class Listener { |
| void beginTopLevelMember(Token token) {} |
| + /// Handle the end of a top level variable declaration. Substructures: |
| + /// - Metadata |
| + /// - Modifiers |
| + /// - Type |
| + /// - Repeated [count] times: |
| + /// - Variable name (identifier) |
| + /// - Field initializer |
|
scheglov
2017/02/20 20:10:36
Seems inconsistent.
Maybe variable in both or fiel
ahe
2017/02/21 09:10:24
I think it would make sense to go go through this
|
| /// Doesn't have a corresponding begin event, use [beginTopLevelMember] |
| /// instead. |
| void endTopLevelFields(int count, Token beginToken, Token endToken) { |
| @@ -622,6 +632,12 @@ class Listener { |
| void beginUnnamedFunction(Token token) {} |
| + /// Handle the end of a function expression (e.g. "() { ... }"). |
| + /// Substructures: |
| + /// - Type variables |
| + /// - Formal parameters |
| + /// - Async marker |
| + /// - Body |
| void endUnnamedFunction(Token token) { |
| logEvent("UnnamedFunction"); |
| } |