API reference
python:astx:astx.ForRangeLoopStmt
class ForRangeLoopStmt
ForRangeLoopStmt(variable: InlineVariableDeclaration, start: Expr, end: Expr, step: Expr, body: Block, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/flows.py:176
Declared as: python:astx:astx.flows.ForRangeLoopStmt
AST class for For Range Statement.
Attributes
-
kind — Kind of value or operation.; Type: ASTKind
-
variable — Variable.; Type: InlineVariableDeclaration
-
start — Starting position.; Type: Expr
-
end — End.; Type: Expr
-
step — Iteration stride.; Type: Expr
-
body — Statements forming the body.; Type: Block
-
loc — Type: SourceLocation
-
comment — Type: str
-
parent — Type: Optional[ASTNodes]
-
ref — Type: str
Methods
-
__init__ — Initialize the ForRangeLoopStmt instance.
-
__str__ — Return a string that represents the object.
-
get_struct — Return the AST structure of the object.