Interface: ForLoopStatementSemantics
compiler.ForLoopStatementSemantics
Semantics for AST Node ForLoopIterationStatement.
Since
0.10.0
Hierarchy
-
↳
ForLoopStatementSemantics
Table of contents
Properties
Properties
forDeclaration
• forDeclaration: undefined
| Expression
<ExpressionSemantics
, ExpressionTypeSemantics
, CompilableASTNode
<SemanticData
, TypeData
>> | VariableDeclaration
The declaration/first statement of the loop, which is executed before the loop condition is evaluated.
This may also simply be a single expression, if the loop does not have a declaration.
Since
0.10.0
Defined in
kipper/core/src/compiler/ast/nodes/statements/iteration-statement/for-loop-iteration-statement/for-loop-iteration-statement-semantics.ts:21
forIterationExp
• forIterationExp: undefined
| Expression
<ExpressionSemantics
, ExpressionTypeSemantics
, CompilableASTNode
<SemanticData
, TypeData
>>
The for iteration expression of the loop, which is executed after the loop body is executed. This is used to update the loop variable or execute any other code that should be executed after each loop iteration.
Since
0.10.0
Defined in
kipper/core/src/compiler/ast/nodes/statements/iteration-statement/for-loop-iteration-statement/for-loop-iteration-statement-semantics.ts:27
loopBody
• loopBody: Statement
<StatementSemantics
, StatementTypeSemantics
>
The body of the loop, which is executed as long as loopCondition is true.
Since
0.10.0
Overrides
IterationStatementSemantics.loopBody
Defined in
kipper/core/src/compiler/ast/nodes/statements/iteration-statement/for-loop-iteration-statement/for-loop-iteration-statement-semantics.ts:38
loopCondition
• loopCondition: undefined
| Expression
<ExpressionSemantics
, ExpressionTypeSemantics
, CompilableASTNode
<SemanticData
, TypeData
>>
The for condition of the loop, which is evaluated after the loop body is executed. If this evaluates to true, the loop will continue executing.
Since
0.10.0
Overrides
IterationStatementSemantics.loopCondition
Defined in
kipper/core/src/compiler/ast/nodes/statements/iteration-statement/for-loop-iteration-statement/for-loop-iteration-statement-semantics.ts:33