Package org.ruby_lang.prism
Class Nodes.ForNode
java.lang.Object
org.ruby_lang.prism.Nodes.Node
org.ruby_lang.prism.Nodes.ForNode
- Enclosing class:
- Nodes
Represents the use of the `for` keyword.
for i in a end
^^^^^^^^^^^^^^
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Nodes.NodeThe collection to iterate over.final Nodes.NodeThe index expression for `for` loops.final Nodes.StatementsNodeRepresents the body of statements to execute for each iteration of the loop.Fields inherited from class org.ruby_lang.prism.Nodes.Node
EMPTY_ARRAY, length, nodeId, startOffset -
Constructor Summary
ConstructorsConstructorDescriptionForNode(int nodeId, int startOffset, int length, Nodes.Node index, Nodes.Node collection, Nodes.StatementsNode statements) -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(AbstractNodeVisitor<T> visitor) protected String<T> voidvisitChildNodes(AbstractNodeVisitor<T> visitor) Methods inherited from class org.ruby_lang.prism.Nodes.Node
endOffset, hasNewLineFlag, setNewLineFlag, setNewLineFlag, toString
-
Field Details
-
index
The index expression for `for` loops. for i in a end ^ -
collection
The collection to iterate over. for i in a end ^ -
statements
Represents the body of statements to execute for each iteration of the loop. for i in a foo(i) ^^^^^^ end
-
-
Constructor Details
-
ForNode
public ForNode(int nodeId, int startOffset, int length, Nodes.Node index, Nodes.Node collection, Nodes.StatementsNode statements)
-
-
Method Details
-
visitChildNodes
- Specified by:
visitChildNodesin classNodes.Node
-
childNodes
- Specified by:
childNodesin classNodes.Node
-
accept
- Specified by:
acceptin classNodes.Node
-
toString
- Specified by:
toStringin classNodes.Node
-