API reference
python:astx:astx.flows.ForCountLoopStmt
class ForCountLoopStmt
ForCountLoopStmt(initializer: InlineVariableDeclaration, condition: Expr, update: Expr, body: Block, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/flows.py:410
AST class for a simple Count-Controlled For Loop statement.
This is a very basic for loop, used by languages like C or C++.
Attributes
-
kind — Type: ASTKind
-
initializer — Type: InlineVariableDeclaration
-
condition — Type: Expr
-
update — Type: Expr
-
body — Type: Block
Methods
-
__init__ — Initialize the ForCountLoopStmt instance.
-
__str__ — Return a string that represents the object.
-
get_struct — Return the AST structure of the object.