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

Unified Diff: mojo/public/bindings/pylib/parse/mojo_parser.py

Issue 224873002: Makes it so mojom files don't need a module (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove viewmanager hack Created 6 years, 9 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 | « mojo/public/bindings/generators/cpp_templates/module.h.tmpl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/bindings/pylib/parse/mojo_parser.py
diff --git a/mojo/public/bindings/pylib/parse/mojo_parser.py b/mojo/public/bindings/pylib/parse/mojo_parser.py
index 4d6349078d2b344919718b36fddd3da53d51881f..3c021df5672ccf44a820e1affa370f0ebe6f820f 100755
--- a/mojo/public/bindings/pylib/parse/mojo_parser.py
+++ b/mojo/public/bindings/pylib/parse/mojo_parser.py
@@ -70,11 +70,15 @@ class Parser(object):
def p_root(self, p):
"""root : import root
- | module"""
+ | module
+ | definitions"""
if len(p) > 2:
p[0] = _ListFromConcat(p[1], p[2])
else:
- p[0] = [p[1]]
+ if p[1][0] != 'MODULE':
+ p[0] = [('MODULE', '', p[1])]
+ else:
+ p[0] = [p[1]]
def p_import(self, p):
"""import : IMPORT STRING_LITERAL"""
« no previous file with comments | « mojo/public/bindings/generators/cpp_templates/module.h.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698