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 bdc13cfe26afa232eace699938a1303d570e6c48..74f8d436450917c9b1302bfe753cf6149168b0c4 100644 |
--- a/mojo/public/tools/bindings/pylib/mojom/parse/parser.py |
+++ b/mojo/public/tools/bindings/pylib/mojom/parse/parser.py |
@@ -155,10 +155,14 @@ class Parser(object): |
# 'eval' the literal to strip the quotes. |
p[0] = eval(p[1]) |
- def p_struct(self, p): |
+ def p_struct_1(self, p): |
"""struct : attribute_section STRUCT NAME LBRACE struct_body RBRACE SEMI""" |
p[0] = ast.Struct(p[3], p[1], p[5]) |
+ def p_struct_2(self, p): |
+ """struct : attribute_section STRUCT NAME SEMI""" |
+ p[0] = ast.Struct(p[3], p[1], None) |
+ |
def p_struct_body_1(self, p): |
"""struct_body : """ |
p[0] = ast.StructBody() |