blocks
¶
Module for different kind of ASTx blocks.
Block
¶
Block(name: str = 'entry', loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: ASTNodes
The AST tree.
Source code in src/astx/base.py
230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
|
append
¶
append(value: AST) -> None
Append a new node to the stack.
Source code in src/astx/base.py
259 260 261 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/blocks.py
19 20 21 22 23 24 25 26 27 28 29 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
217 218 219 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
211 212 213 214 215 |
|