Class BoxForIn
java.lang.Object
ortus.boxlang.compiler.ast.BoxNode
ortus.boxlang.compiler.ast.BoxStatement
ortus.boxlang.compiler.ast.statement.BoxForIn
- All Implemented Interfaces:
BoxVisitable
AST Node representing a for statement
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionBoxForIn
(String label, BoxExpression variable, BoxExpression expression, BoxStatement body, Boolean hasVar, Position position, String sourceText) Creates the AST node -
Method Summary
Modifier and TypeMethodDescriptionAccept method for replacing visitor support.void
Accept method for visitor support.getBody()
getLabel()
Gets the label of the statementvoid
setBody
(BoxStatement body) void
setExpression
(BoxExpression expression) void
void
Sets the label of the statementvoid
setVariable
(BoxExpression variable) toMap()
Methods inherited from class ortus.boxlang.compiler.ast.BoxNode
addComment, associateComments, endsOnSameLineAs, enumToMap, getAncestors, getChildren, getComments, getDescendants, getDescendantsOfType, getDocComment, getFirstAncestorOfType, getFirstAncestorOfType, getFirstNodeOfType, getFirstNodeOfType, getFirstNodeOfTypes, getParent, getPosition, getSourceText, isAfter, isBefore, isInside, replaceChildren, replaceChildren, setComments, setParent, setPosition, setSourceText, startsOnEndLineOf, toJSON, toString
-
Constructor Details
-
BoxForIn
public BoxForIn(String label, BoxExpression variable, BoxExpression expression, BoxStatement body, Boolean hasVar, Position position, String sourceText) Creates the AST node- Parameters:
variable
- for loop variableexpression
- for loop collectionbody
- list of the statement in the body of the loopposition
- position of the statement in the source codesourceText
- source code that originated the Node
-
-
Method Details
-
getVariable
-
getExpression
-
getBody
-
getHasVar
-
setVariable
-
setExpression
-
setBody
-
setHasVar
-
getLabel
Gets the label of the statement- Returns:
- the label of the statement
-
setLabel
Sets the label of the statement- Parameters:
label
- the label of the statement
-
toMap
-
accept
Description copied from interface:BoxVisitable
Accept method for visitor support.- Parameters:
v
- the visitor implementation
-
accept
Description copied from interface:BoxVisitable
Accept method for replacing visitor support. Each accept returns the node, or a replacement node.- Parameters:
v
- the visitor implementation
-