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

Unified Diff: tools/dom/scripts/idlrenderer.py

Issue 13704011: Map enums to strings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
« no previous file with comments | « tools/dom/scripts/idlnode.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/idlrenderer.py
diff --git a/tools/dom/scripts/idlrenderer.py b/tools/dom/scripts/idlrenderer.py
index aa2e139d9a5dc7ad698df8de4b027b8402cdad79..78661e70afe92c2593a2ca4263a7f963f8dafa3f 100755
--- a/tools/dom/scripts/idlrenderer.py
+++ b/tools/dom/scripts/idlrenderer.py
@@ -53,15 +53,21 @@ def render(idl_node, indent_str=' '):
elif isinstance(node, IDLFile):
w(node.modules)
w(node.interfaces)
+ w(node.enums)
+ w(node.typeDefs)
elif isinstance(node, IDLModule):
wsp(node.annotations)
wsp(node.ext_attrs)
wln('module %s {' % node.id)
begin_indent()
w(node.interfaces)
+ w(node.enums)
w(node.typeDefs)
end_indent()
wln('};')
+ elif isinstance(node, IDLEnum):
+ w('enum %s {}' % node.id)
+ # TODO(antonm): emit values as well.
elif isinstance(node, IDLInterface):
if node.annotations:
wln(node.annotations)
« no previous file with comments | « tools/dom/scripts/idlnode.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698