base
¶
AST classes and functions.
Classes:
-
ExprType
–ExprType expression class.
AST
¶
AST main expression class.
Methods:
-
get_struct
–Return a structure that represents the node object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/base.py
180 181 182 183 184 185 186 187 188 189 190 191 |
|
get_struct
abstractmethod
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a structure that represents the node object.
Source code in src/astx/base.py
255 256 257 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
ASTNodes
¶
ASTNodes(name: str = 'entry', loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
AST with a list of nodes, supporting type-specific elements.
Methods:
-
append
–Append a new node to the stack.
-
get_struct
–Return a string that represents the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/base.py
278 279 280 281 282 283 284 285 286 287 288 |
|
append
¶
append(value: ASTType) -> None
Append a new node to the stack.
Source code in src/astx/base.py
305 306 307 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a string that represents the object.
Source code in src/astx/base.py
317 318 319 320 321 322 323 324 325 326 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
DataType
¶
Bases: ExprType
AST main expression class.
Methods:
-
get_struct
–Return a simple structure that represents the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
Expr
¶
Bases: AST
AST main expression class.
Methods:
-
get_struct
–Return a structure that represents the node object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/base.py
180 181 182 183 184 185 186 187 188 189 190 191 |
|
get_struct
abstractmethod
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a structure that represents the node object.
Source code in src/astx/base.py
255 256 257 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
ExprType
¶
Bases: Expr
ExprType expression class.
Methods:
-
get_struct
–Return a structure that represents the node object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/base.py
180 181 182 183 184 185 186 187 188 189 190 191 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a structure that represents the node object.
Source code in src/astx/base.py
344 345 346 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
OperatorType
¶
Bases: DataType
AST main expression class.
Methods:
-
get_struct
–Return a simple structure that represents the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/base.py
388 389 390 391 392 393 394 395 396 397 398 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
404 405 406 407 408 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
StatementType
¶
Bases: AST
AST main expression class.
Methods:
-
get_struct
–Return a structure that represents the node object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/base.py
180 181 182 183 184 185 186 187 188 189 190 191 |
|
get_struct
abstractmethod
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a structure that represents the node object.
Source code in src/astx/base.py
255 256 257 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
Undefined
¶
Bases: Expr
Undefined expression class.
Methods:
-
get_struct
–Return a simple structure that represents the object.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/base.py
180 181 182 183 184 185 186 187 188 189 190 191 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
354 355 356 357 358 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|
is_using_jupyter_notebook
¶
is_using_jupyter_notebook() -> bool
Check if it is executed in a jupyter notebook.
Source code in src/astx/base.py
51 52 53 54 55 56 57 58 59 60 |
|