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 846aae785785eb7e6ba2fb31cf984a388a5b3329..5df77bf3d4a82105cd870730ecbfcc515e66183b 100644 |
--- a/mojo/public/tools/bindings/pylib/mojom/parse/ast.py |
+++ b/mojo/public/tools/bindings/pylib/mojom/parse/ast.py |
@@ -83,6 +83,24 @@ class AttributeList(NodeListBase): |
_list_item_type = Attribute |
+class Import(NodeBase): |
+ """Represents an import statement.""" |
+ |
+ def __init__(self, import_filename, **kwargs): |
+ assert isinstance(import_filename, str) |
+ NodeBase.__init__(self, **kwargs) |
+ self.import_filename = import_filename |
+ |
+ def __eq__(self, other): |
+ return self.import_filename == other.import_filename |
+ |
+ |
+class ImportList(NodeListBase): |
+ """Represents a list (i.e., sequence) of import statements.""" |
+ |
+ _list_item_type = Import |
+ |
+ |
class Module(NodeBase): |
"""Represents a module statement.""" |