Index: tools/dom/scripts/idlnode.py |
diff --git a/tools/dom/scripts/idlnode.py b/tools/dom/scripts/idlnode.py |
index 006006df24e2399eaa82465fcc0d966827305d58..dc57042a6a1a53f0ad66c69f747616e82177b657 100755 |
--- a/tools/dom/scripts/idlnode.py |
+++ b/tools/dom/scripts/idlnode.py |
@@ -259,6 +259,7 @@ class IDLFile(IDLNode): |
self.implementsStatements = self._convert_all(ast, 'ImplStmt', |
IDLImplementsStatement) |
self.typeDefs = self._convert_all(ast, 'TypeDef', IDLTypeDef) |
+ self.enums = self._convert_all(ast, 'Enum', IDLEnum) |
for module in modules: |
self.interfaces.extend(module.interfaces) |
self.implementsStatements.extend(module.implementsStatements) |
@@ -274,6 +275,7 @@ class IDLModule(IDLNode): |
self._convert_annotations(ast) |
self.interfaces = self._convert_all(ast, 'Interface', IDLInterface) |
self.typeDefs = self._convert_all(ast, 'TypeDef', IDLTypeDef) |
+ self.enums = self._convert_all(ast, 'Enum', IDLNode) |
self.implementsStatements = self._convert_all(ast, 'ImplStmt', |
IDLImplementsStatement) |
@@ -378,6 +380,14 @@ class IDLType(IDLNode): |
return label |
+class IDLEnum(IDLNode): |
+ """IDLNode for 'enum [id] { [string]+ }'""" |
+ def __init__(self, ast): |
+ IDLNode.__init__(self, ast) |
+ self._convert_annotations(ast) |
+ # TODO(antonm): save enum values. |
+ |
+ |
class IDLTypeDef(IDLNode): |
"""IDLNode for 'typedef [type] [id]' declarations.""" |
def __init__(self, ast): |