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""" |