API reference
python:astx:astx.WhileExpr
class WhileExpr
WhileExpr(condition: Expr, body: Block, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/flows.py:988
Declared as: python:astx:astx.flows.WhileExpr
AST class for while expression.
Attributes
-
kind — Type: ASTKind
-
condition — Type: Expr
-
body — Type: Block
Methods
-
__init__ — Initialize the WhileExpr instance.
-
__str__ — Return a string representation of the object.
-
get_struct — Return the AST structure of the object.