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

Unified Diff: mojo/public/tools/bindings/pylib/mojom/parse/parser.py

Issue 262633005: Adding attributes to module and struct in mojom. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
Index: mojo/public/tools/bindings/pylib/mojom/parse/parser.py
diff --git a/mojo/public/tools/bindings/pylib/mojom/parse/parser.py b/mojo/public/tools/bindings/pylib/mojom/parse/parser.py
index e75b28a3faa7fc6486f1b8c5a9527a94fb2448cc..2bb2417965001fdedd0fe9573e20adc816aa0b47 100755
--- a/mojo/public/tools/bindings/pylib/mojom/parse/parser.py
+++ b/mojo/public/tools/bindings/pylib/mojom/parse/parser.py
@@ -80,7 +80,7 @@ class Parser(object):
# Generator expects a module. If one wasn't specified insert one with an
# empty name.
if p[1][0] != 'MODULE':
- p[0] = [('MODULE', '', p[1])]
+ p[0] = [('MODULE', '', [], p[1])]
else:
p[0] = [p[1]]
@@ -90,8 +90,8 @@ class Parser(object):
p[0] = ('IMPORT', eval(p[2]))
def p_module(self, p):
- """module : MODULE identifier LBRACE definitions RBRACE"""
- p[0] = ('MODULE', p[2], p[4])
+ """module : attribute_section MODULE identifier LBRACE definitions RBRACE"""
+ p[0] = ('MODULE', p[3], p[1], p[5])
def p_definitions(self, p):
"""definitions : definition definitions

Powered by Google App Engine
This is Rietveld 408576698