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

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

Issue 16636002: Partial support for new getters/setters declaration. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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/dom.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/idlnode.py
diff --git a/tools/dom/scripts/idlnode.py b/tools/dom/scripts/idlnode.py
index ea6d78d552c8a9ecbde64c1acb02d09837c6c799..9726cb7846d28c6267d70f05282f6f0d5976625b 100755
--- a/tools/dom/scripts/idlnode.py
+++ b/tools/dom/scripts/idlnode.py
@@ -478,6 +478,13 @@ class IDLOperation(IDLMember):
self.arguments = self._convert_all(ast, 'Argument', IDLArgument)
self.specials = self._find_all(ast, 'Special')
self.is_stringifier = self._has(ast, 'Stringifier')
+ # Special case: there are getters of the form
+ # getter <ReturnType>(args). For now force the name to be __getter__,
+ # but it should be operator[] later.
+ if self.id is None:
+ if len(self.specials) != 1:
+ raise Exception('Cannot handle %s: operation has no id' % ast)
+ self.id = '__%s__' % self.specials[0]
def _extra_repr(self):
return [self.arguments]
« no previous file with comments | « tools/dom/dom.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698