Index: pkg/compiler/lib/src/scanner/listener.dart |
diff --git a/pkg/compiler/lib/src/scanner/listener.dart b/pkg/compiler/lib/src/scanner/listener.dart |
index ac28f07686ba512decc8b5e05e7a326e24faa439..aa5224168ab42ed3ebf0579e1555306dfa4a1dc6 100644 |
--- a/pkg/compiler/lib/src/scanner/listener.dart |
+++ b/pkg/compiler/lib/src/scanner/listener.dart |
@@ -868,7 +868,12 @@ class ElementListener extends Listener { |
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)); |
+ |
+ int id = idGenerator(); |
+ Element enclosing = compilationUnitElement; |
+ pushElement(new EnumClassElementX(name.source, enclosing, id, |
+ new Enum(enumKeyword, name, names))); |
+ rejectBuiltInIdentifier(name); |
} |
void endExport(Token exportKeyword, Token semicolon) { |
@@ -1547,6 +1552,12 @@ class NodeListener extends ElementListener { |
classKeyword, endToken)); |
} |
+ 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 endClassBody(int memberCount, Token beginToken, Token endToken) { |
pushNode(makeNodeList(memberCount, beginToken, endToken, null)); |
} |