Package org.jruby.ast
Class ForNode
java.lang.Object
org.jruby.ast.Node
org.jruby.ast.IterNode
org.jruby.ast.ForNode
- All Implemented Interfaces:
DefNode
A 'for' statement. This is implemented using iter and that is how MRI does things,
but 'for's do not have their own stack, so doing this way is mildly painful.
- See Also:
-
Field Summary
Fields inherited from class org.jruby.ast.Node
containsVariableAssignment, newline
-
Constructor Summary
ConstructorsConstructorDescriptionForNode
(int line, Node varNode, Node bodyNode, Node iterNode, StaticScope scope, int endLine) -
Method Summary
Modifier and TypeMethodDescription<T> T
accept
(NodeVisitor<T> iVisitor) Accept for the visitor pattern.Gets the argsNode.Methods inherited from class org.jruby.ast.IterNode
getBodyNode, getEndLine, getScope, getVarNode
Methods inherited from class org.jruby.ast.Node
containsVariableAssignment, createList, createList, createList, createList, executesOnce, getFile, getLine, getNodeName, isNewline, isNil, needsDefinitionCheck, setLine, setNewline, toString, toString, toStringExtraInfo, toStringInternal, unsetNewline
-
Constructor Details
-
ForNode
public ForNode(int line, Node varNode, Node bodyNode, Node iterNode, StaticScope scope, int endLine)
-
-
Method Details
-
getArgsNode
Description copied from interface:DefNode
Gets the argsNode.- Specified by:
getArgsNode
in interfaceDefNode
- Overrides:
getArgsNode
in classIterNode
- Returns:
- Returns a Node
-
getNodeType
- Overrides:
getNodeType
in classIterNode
- Returns:
- the nodeId
-
getIterNode
-
accept
Accept for the visitor pattern. -
childNodes
- Overrides:
childNodes
in classIterNode
-