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

Unified Diff: sdk/lib/_internal/compiler/implementation/scanner/listener.dart

Issue 698563005: Support parsing of enums in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add unparser test. Created 6 years, 1 month 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: sdk/lib/_internal/compiler/implementation/scanner/listener.dart
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/listener.dart b/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
index 2b69193e011371e886748ea8cb8d1a296b6dd537..0965c5d1aff0ecf6bf5060e361234e0d437e604f 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
@@ -72,6 +72,12 @@ class Listener {
Token endToken) {
}
+ void beginEnum(Token enumKeyword) {
+ }
+
+ void endEnum(Token enumKeyword, Token endBrace, int count) {
+ }
+
void beginExport(Token token) {
}
@@ -842,6 +848,12 @@ class ElementListener extends Listener {
isDeferred: isDeferred));
}
+ void endEnum(Token enumKeyword, Token endBrace, int count) {
+ NodeList names = makeNodeList(count, enumKeyword.next.next, endBrace, ",");
+ Identifier name = popNode();
+ pushNode(new Enum(enumKeyword, name, names));
+ }
+
void endExport(Token exportKeyword, Token semicolon) {
NodeList combinators = popNode();
StringNode uri = popNode();

Powered by Google App Engine
This is Rietveld 408576698