API reference
python:astx:astx.flows.ForCountLoopExpr
class ForCountLoopExpr
ForCountLoopExpr(initializer: InlineVariableDeclaration, condition: Expr, update: Expr, body: Block, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/flows.py:434
AST class for a simple Count-Controlled For Loop expression.
This is a very basic for loop, used by languages like C or C++.
Attributes
-
kind — Kind of value or operation.; Type: ASTKind
-
initializer — Expression providing the initial value.; Type: InlineVariableDeclaration
-
condition — Condition controlling the operation.; Type: Expr
-
update — Update.; Type: Expr
-
body — Statements forming the body.; Type: Block
-
loc — Type: SourceLocation
-
comment — Type: str
-
parent — Type: Optional[ASTNodes]
-
ref — Type: str
-
nbytes — Type: int
Methods
-
__init__ — Initialize the ForLoopCountExpr instance.
-
__str__ — Return a string that represents the object.
-
get_struct — Return the AST structure of the object.