Class: Rubinius::AST::NthRef

Inherits:
Node
  • Object
show all
Defined in:
lib/compiler/ast/variables.rb

Constant Summary collapse

Mode =
5

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph, #attributes, #children, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, node_name, #pos, #set_child, transform, #transform, transform_comment, transform_kind, transform_kind=, transform_name, #visit, #walk

Constructor Details

#initialize(line, ref) ⇒ NthRef

Returns a new instance of NthRef.



37
38
39
40
# File 'lib/compiler/ast/variables.rb', line 37

def initialize(line, ref)
  @line = line
  @which = ref
end

Instance Attribute Details

#whichObject

Returns the value of attribute which.



35
36
37
# File 'lib/compiler/ast/variables.rb', line 35

def which
  @which
end

Instance Method Details

#to_sexpObject



44
45
46
# File 'lib/compiler/ast/variables.rb', line 44

def to_sexp
  [:nth_ref, @which]
end