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

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: Fix annotations Created 6 years, 7 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 4ad89d99783bb9bb7d813f5e55a5f541f251effa..9dd6e07bd2e1cf69148159e9e45c320d4f94f5a7 100644
--- a/mojo/public/tools/bindings/pylib/mojom/parse/parser.py
+++ b/mojo/public/tools/bindings/pylib/mojom/parse/parser.py
@@ -79,7 +79,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]]
@@ -89,8 +89,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
« no previous file with comments | « mojo/public/tools/bindings/pylib/mojom/generate/data.py ('k') | mojo/public/tools/bindings/pylib/mojom/parse/translate.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698