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

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

Issue 1515423002: [mojo] Add mojom parser support for native-only structs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pickle2
Patch Set: oops Created 5 years 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/ast.py
diff --git a/mojo/public/tools/bindings/pylib/mojom/parse/ast.py b/mojo/public/tools/bindings/pylib/mojom/parse/ast.py
index ffb44e029b2ba1abf7e05f17e76b7c2c8712b117..6473b02b6ba292bd963d6dd9163c7db57b9348c3 100644
--- a/mojo/public/tools/bindings/pylib/mojom/parse/ast.py
+++ b/mojo/public/tools/bindings/pylib/mojom/parse/ast.py
@@ -326,7 +326,7 @@ class Struct(Definition):
def __init__(self, name, attribute_list, body, **kwargs):
assert attribute_list is None or isinstance(attribute_list, AttributeList)
- assert isinstance(body, StructBody)
+ assert isinstance(body, StructBody) or body is None
super(Struct, self).__init__(name, **kwargs)
self.attribute_list = attribute_list
self.body = body
« no previous file with comments | « mojo/public/tools/bindings/pylib/mojom/generate/module.py ('k') | mojo/public/tools/bindings/pylib/mojom/parse/parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698