API reference
python:astx:astx.packages.Module
class Module
Module(name: str = 'main', loc: SourceLocation = NO_SOURCE_LOCATION)
Source: packages/astx/src/astx/packages.py:63
AST main expression class.
Attributes
-
kind — Kind of value or operation.; Type: ASTKind
-
name — Name identifying this declaration.; Type: str
-
block — Block of statements.; Type: list[AST]
-
loc — Type: SourceLocation
-
comment — Type: str
-
parent — Type: Optional[ASTNodes]
-
ref — Type: str
-
nodes — Type: list[ASTType]
-
position — Type: int
Methods
-
__init__ — Initialize the AST instance.
-
__str__ — Return the string representation of the object.
-
get_struct — Return the AST structure of the object.
Properties
- block — Define an alias for self.nodes.