API reference
python:astx:astx.callables.ModuleInitializer
class ModuleInitializer
ModuleInitializer(body: Block, loc: SourceLocation = NO_SOURCE_LOCATION)
Source: packages/astx/src/astx/callables.py:565
A module startup block lowered as a private zero-argument function.
Attributes
-
kind — The underlying function definition kind.; Type: ASTKind
-
prototype — Private startup signature used by the backend.; Type: FunctionPrototype
-
body — Statements forming the initializer body.; Type: Block
-
name — Internal function name reserved for startup.; Type: str
-
decorators — ...; Type: tuple[Identifier, ...]
-
loc — Type: SourceLocation
-
comment — Type: str
-
parent — Type: Optional[ASTNodes]
-
ref — Type: str
Methods
-
__init__ — Construct a module initializer.
-
get_struct — Return a startup block in the module structure.