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

public class ArgumentNode extends Node implements INameNode
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.
  • Constructor Details

    • ArgumentNode

      public ArgumentNode(int line, RubySymbol identifier, int location)
  • Method Details

    • getNodeType

      public NodeType getNodeType()
      Specified by:
      getNodeType in class Node
      Returns:
      the nodeId
    • accept

      public <T> T accept(NodeVisitor<T> visitor)
      Specified by:
      accept in class Node
    • 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

      public RubySymbol getName()
      Specified by:
      getName in interface INameNode
    • childNodes

      public List<Node> childNodes()
      Specified by:
      childNodes in class Node