| 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 9f3088e3fc1ea7d0fa43bfbeb80b90fe6062c0e4..846aae785785eb7e6ba2fb31cf984a388a5b3329 100644
|
| --- a/mojo/public/tools/bindings/pylib/mojom/parse/ast.py
|
| +++ b/mojo/public/tools/bindings/pylib/mojom/parse/ast.py
|
| @@ -83,6 +83,22 @@ class AttributeList(NodeListBase):
|
| _list_item_type = Attribute
|
|
|
|
|
| +class Module(NodeBase):
|
| + """Represents a module statement."""
|
| +
|
| + def __init__(self, name, attribute_list, **kwargs):
|
| + # |name| is either none or a "wrapped identifier".
|
| + assert name is None or isinstance(name, tuple)
|
| + assert attribute_list is None or isinstance(attribute_list, AttributeList)
|
| + NodeBase.__init__(self, **kwargs)
|
| + self.name = name
|
| + self.attribute_list = attribute_list
|
| +
|
| + def __eq__(self, other):
|
| + return self.name == other.name and \
|
| + self.attribute_list == other.attribute_list
|
| +
|
| +
|
| class Ordinal(NodeBase):
|
| """Represents an ordinal value labeling, e.g., a struct field."""
|
|
|
|
|