An AST node representing a
for,
for-
in, or
for-
each-
in statement.
The shape of this node is
IForLoopNode IContainerNode <-- getConditionalsContainerNode() IBlockNode <-- getStatementContentsNode()
In the case of a regular
for statement, the container node contains the three control expressions. For example,
for (i = 0; i < n; i++) { ... } is represented as
IForLoopNode "for" IContainerNode IBinaryOperatorNode "=" IIdentifierNode "i" INumericalLiteralNode 0 IBinaryOperatorNode "<" IIdentifierNode "i" IIdentifierNode "n" IUnaryOperatorNode "++" IIdentifierNode "i" IBlockNode ...
In the case of a
for-
in, or
for-
each-
in statement, the container node contains a single binary operator node for the
in operator. For example,
for (p in o) { ... } is represented as
IForLoopNode "for" IContainerNode IBinaryOperatorNode "in" IIdentifierNode "p" IIdentifierNode "o" IBlockNode ...