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

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

Issue 2711813002: Add AstBuilder support for enum declarations. (Closed)
Patch Set: Created 3 years, 10 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 7ea015ffce4bb196d35eef707de423eb9f9ee040..7d5358fbfc1feb79d29b7509eef30e5e459e827e 100644
--- a/pkg/front_end/lib/src/fasta/parser/listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/listener.dart
@@ -77,8 +77,12 @@ class Listener {
/// - supertype (may be a mixin application)
/// - implemented types
/// - class body
- void endClassDeclaration(int interfacesCount, Token beginToken,
- Token classKeyword, Token extendsKeyword, Token implementsKeyword,
+ void endClassDeclaration(
+ int interfacesCount,
+ Token beginToken,
+ Token classKeyword,
+ Token extendsKeyword,
+ Token implementsKeyword,
Token endToken) {
logEvent("ClassDeclaration");
}
@@ -123,6 +127,11 @@ class Listener {
void beginEnum(Token enumKeyword) {}
+ /// Handle the end of an enum declaration. Substructures:
+ /// - Metadata
+ /// - Enum name (identifier)
+ /// - [count] times:
+ /// - Enum value (identifier)
void endEnum(Token enumKeyword, Token endBrace, int count) {
logEvent("Enum");
}
@@ -269,9 +278,8 @@ class Listener {
/// application, the implemented types are a TypeList, whereas for a class
/// declaration, each implemented type is listed separately on the stack, and
/// the number of implemented types is passed as a parameter.
- void endNamedMixinApplication(
- Token begin, Token classKeyword, Token equals, Token implementsKeyword,
- Token endToken) {
+ void endNamedMixinApplication(Token begin, Token classKeyword, Token equals,
+ Token implementsKeyword, Token endToken) {
logEvent("NamedMixinApplication");
}

Powered by Google App Engine
This is Rietveld 408576698