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

Unified Diff: client/dom/scripts/dartgenerator.py

Issue 8473008: Generate constants for IDL classes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add frog dom Created 9 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
« no previous file with comments | « client/dom/generated/src/frog/XPathResult.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/dom/scripts/dartgenerator.py
diff --git a/client/dom/scripts/dartgenerator.py b/client/dom/scripts/dartgenerator.py
index 96cac0300032428880617526c2d8a694ed2e2a61..f93fdd7dcdda23ccb32f50fad851bab530f87cc6 100755
--- a/client/dom/scripts/dartgenerator.py
+++ b/client/dom/scripts/dartgenerator.py
@@ -1953,6 +1953,14 @@ class FrogInterfaceGenerator(object):
pass
def AddConstant(self, constant):
+ # Since we are currently generating native classes without interfaces,
+ # generate the constants as part of the class. This will need to go away
+ # if we revert back to generating interfaces.
+ self._members_emitter.Emit('\n static final $TYPE $NAME = $VALUE;\n',
+ NAME=constant.id,
+ TYPE=constant.type.id,
+ VALUE=constant.value)
+
pass
def AddGetter(self, attr):
« no previous file with comments | « client/dom/generated/src/frog/XPathResult.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698