Package org.jruby.ast
Class IterNode
java.lang.Object
org.jruby.ast.Node
org.jruby.ast.IterNode
- All Implemented Interfaces:
DefNode
- Direct Known Subclasses:
ForNode,LambdaNode,PostExeNode,PreExeNode
Represents a block.
-
Field Summary
Fields inherited from class org.jruby.ast.Node
containsVariableAssignment, newline -
Constructor Summary
ConstructorsConstructorDescriptionIterNode(int line, ArgsNode args, Node body, StaticScope scope, int endLine) Used for all non-for types of blocks.IterNode(int line, Node args, StaticScope scope, Node body, int endLine) Used by ForNode only. -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(NodeVisitor<T> iVisitor) Accept for the visitor pattern.Gets the argsNode.Gets the bodyNode.intWhich line if the end keyword locatedgetScope()Get the static scoping information.Gets the varNode.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
-
IterNode
Used by ForNode only. This is to support 1.8-style assignments which only 'for' expressions use. -
IterNode
Used for all non-for types of blocks.
-
-
Method Details
-
getNodeType
- Specified by:
getNodeTypein classNode- Returns:
- the nodeId
-
accept
Accept for the visitor pattern. -
getArgsNode
Description copied from interface:DefNodeGets the argsNode.- Specified by:
getArgsNodein interfaceDefNode- Returns:
- Returns a Node
-
getScope
Description copied from interface:DefNodeGet the static scoping information. -
getBodyNode
Gets the bodyNode.- Specified by:
getBodyNodein interfaceDefNode- Returns:
- Returns a Node
-
getVarNode
Gets the varNode.- Returns:
- Returns a Node
-
childNodes
- Specified by:
childNodesin classNode
-
getEndLine
public int getEndLine()Description copied from interface:DefNodeWhich line if the end keyword located- Specified by:
getEndLinein interfaceDefNode- Returns:
- the line (zero-offset)
-