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

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

Issue 376023002: Mojo: Mojom parser: Make |module| use an |identifier_wrapped|. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 5 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 | « no previous file | mojo/public/tools/bindings/pylib/mojom/parse/translate.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e4dfd7bb1d798fca9fafdb410e8d5d13e7b9de5a..9d9dd6b8d8a3a3b5ece539fb44fdfc3f385cb4ff 100644
--- a/mojo/public/tools/bindings/pylib/mojom/parse/parser.py
+++ b/mojo/public/tools/bindings/pylib/mojom/parse/parser.py
@@ -96,7 +96,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', '', None, p[1])]
+ p[0] = [('MODULE', None, None, p[1])]
else:
p[0] = [p[1]]
@@ -106,8 +106,8 @@ class Parser(object):
p[0] = ('IMPORT', eval(p[2]))
def p_module(self, p):
- """module : attribute_section MODULE identifier LBRACE definition_list \
- RBRACE"""
+ """module : attribute_section MODULE identifier_wrapped LBRACE \
+ definition_list RBRACE"""
p[0] = ('MODULE', p[3], p[1], p[5])
def p_definition_list(self, p):
@@ -315,6 +315,8 @@ class Parser(object):
"""identifier_wrapped : identifier"""
p[0] = ('IDENTIFIER', p[1])
+ # TODO(vtl): Make this produce a "wrapped" identifier (probably as an
+ # |ast.Identifier|, to be added) and get rid of identifier_wrapped.
def p_identifier(self, p):
"""identifier : NAME
| NAME DOT identifier"""
« no previous file with comments | « no previous file | mojo/public/tools/bindings/pylib/mojom/parse/translate.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698