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

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

Issue 2980043003: more fasta event cleanup and testing (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 335a0e0c871aea2ff219266edf7ed0b23cd0b5ac..198afd3a502680218151fa7e378122d134241df2 100644
--- a/pkg/front_end/lib/src/fasta/parser/listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/listener.dart
@@ -222,6 +222,8 @@ class Listener {
logEvent("Fields");
}
+ /// Marks the start of a for statement which is ended by either
+ /// [endForStatement] or [endForIn].
void beginForStatement(Token token) {}
void endForStatement(Token forKeyword, Token leftSeparator,
@@ -235,6 +237,7 @@ class Listener {
logEvent("ForStatementBody");
}
+ // One of the two possible corresponding end events for [beginForStatement].
void endForIn(Token awaitToken, Token forToken, Token leftParenthesis,
Token inKeyword, Token rightParenthesis, Token endToken) {
logEvent("ForIn");
@@ -694,6 +697,9 @@ class Listener {
logEvent("TopLevelDeclaration");
}
+ /// Marks the beginning of a top level field or method declaration.
+ /// Doesn't have a corresponding end event.
+ /// See [endTopLevelFields] and [endTopLevelMethod].
void beginTopLevelMember(Token token) {}
/// Handle the end of a top level variable declaration. Substructures:
@@ -703,8 +709,8 @@ class Listener {
/// - Repeated [count] times:
/// - Variable name (identifier)
/// - Field initializer
- /// Doesn't have a corresponding begin event, use [beginTopLevelMember]
- /// instead.
+ /// Doesn't have a corresponding begin event.
+ /// Use [beginTopLevelMember] instead.
void endTopLevelFields(int count, Token beginToken, Token endToken) {
logEvent("TopLevelFields");
}
@@ -996,13 +1002,8 @@ class Listener {
void beginSwitchCase(int labelCount, int expressionCount, Token firstToken) {}
- void handleSwitchCase(
- int labelCount,
- int expressionCount,
- Token defaultKeyword,
- int statementCount,
- Token firstToken,
- Token endToken) {
+ void endSwitchCase(int labelCount, int expressionCount, Token defaultKeyword,
+ int statementCount, Token firstToken, Token endToken) {
logEvent("SwitchCase");
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/body_builder.dart ('k') | pkg/front_end/lib/src/fasta/parser/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698