Package org.jruby.ast
Class ArgumentNode
java.lang.Object
org.jruby.ast.Node
org.jruby.ast.ArgumentNode
- All Implemented Interfaces:
INameNode
- Direct Known Subclasses:
KeywordRestArgNode
,RestArgNode
Simple Node for named entities. Things like the name of a method will make a node
for the name. Also local variables will make a ArgumentNode. In the case of a local
variable we will also keep a list of it's location.
-
Field Summary
Fields inherited from class org.jruby.ast.Node
containsVariableAssignment, newline
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T
accept
(NodeVisitor<T> visitor) int
getDepth()
How many scopes should we burrow down to until we need to set the block variable value.int
getIndex()
Gets the index within the scope construct that actually holds the eval'd value of this local variablegetName()
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
-
ArgumentNode
-
-
Method Details
-
getNodeType
- Specified by:
getNodeType
in classNode
- Returns:
- the nodeId
-
accept
-
getDepth
public int getDepth()How many scopes should we burrow down to until we need to set the block variable value.- Returns:
- 0 for current scope, 1 for one down, ...
-
getIndex
public int getIndex()Gets the index within the scope construct that actually holds the eval'd value of this local variable- Returns:
- Returns an int offset into storage structure
-
getName
-
childNodes
- Specified by:
childNodes
in classNode
-