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> T
accept
(NodeVisitor<T> iVisitor) Accept for the visitor pattern.Gets the argsNode.Gets the bodyNode.int
Which 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:
getNodeType
in classNode
- Returns:
- the nodeId
-
accept
Accept for the visitor pattern. -
getArgsNode
Description copied from interface:DefNode
Gets the argsNode.- Specified by:
getArgsNode
in interfaceDefNode
- Returns:
- Returns a Node
-
getScope
Description copied from interface:DefNode
Get the static scoping information. -
getBodyNode
Gets the bodyNode.- Specified by:
getBodyNode
in interfaceDefNode
- Returns:
- Returns a Node
-
getVarNode
Gets the varNode.- Returns:
- Returns a Node
-
childNodes
- Specified by:
childNodes
in classNode
-
getEndLine
public int getEndLine()Description copied from interface:DefNode
Which line if the end keyword located- Specified by:
getEndLine
in interfaceDefNode
- Returns:
- the line (zero-offset)
-