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> Taccept(NodeVisitor<T> iVisitor) Accept for the visitor pattern.Gets the argsNode.Methods inherited from class org.jruby.ast.IterNode
getBodyNode, getEndLine, getScope, getVarNodeMethods 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:DefNodeGets the argsNode.- Specified by:
getArgsNodein interfaceDefNode- Overrides:
getArgsNodein classIterNode- Returns:
- Returns a Node
-
getNodeType
- Overrides:
getNodeTypein classIterNode- Returns:
- the nodeId
-
getIterNode
-
accept
Accept for the visitor pattern. -
childNodes
- Overrides:
childNodesin classIterNode
-