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

Unified Diff: mojo/public/bindings/parser/mojo_translate.py

Issue 63843003: Mojo: Add support for attributes [name=value] on interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: mojo/public/bindings/parser/mojo_translate.py
diff --git a/mojo/public/bindings/parser/mojo_translate.py b/mojo/public/bindings/parser/mojo_translate.py
index 46aa071c487504392178dfaceb407b5c21e0a22b..60b06e3f0700c5e53c0cc370340745bfcf243ef0 100755
--- a/mojo/public/bindings/parser/mojo_translate.py
+++ b/mojo/public/bindings/parser/mojo_translate.py
@@ -76,11 +76,12 @@ class MojomBuilder():
self.mojom['structs'].append(struct)
# TODO(darin): Add support for |attributes|
- def AddInterface(self, name, methods):
+ def AddInterface(self, name, attributes, methods):
interface = {}
interface['name'] = name
interface['methods'] = MapMethods(methods)
self.mojom['interfaces'].append(interface)
+ # TODO(darin): Add support for |attributes|
darin (slow to review) 2013/11/07 06:14:31 This TODO is about adding some way to express attr
def AddModule(self, name, contents):
self.mojom['name'] = name
@@ -91,7 +92,7 @@ class MojomBuilder():
if item[0] == 'STRUCT':
self.AddStruct(name=item[1], attributes=item[2], fields=item[3])
elif item[0] == 'INTERFACE':
- self.AddInterface(name=item[1], methods=item[2])
+ self.AddInterface(name=item[1], attributes=item[2], methods=item[3])
def Build(self, tree):
if tree[0] == 'MODULE':
« mojo/public/bindings/parser/mojo_parser.py ('K') | « mojo/public/bindings/parser/mojo_parser.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698