Class: Rubinius::AST::Range

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

Direct Known Subclasses

RangeExclude

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, start, finish) ⇒ Range

Returns a new instance of Range.



104
105
106
107
108
# File 'lib/compiler/ast/literals.rb', line 104

def initialize(line, start, finish)
  @line = line
  @start = start
  @finish = finish
end

Instance Attribute Details

#finishObject

Returns the value of attribute finish.



102
103
104
# File 'lib/compiler/ast/literals.rb', line 102

def finish
  @finish
end

#startObject

Returns the value of attribute start.



102
103
104
# File 'lib/compiler/ast/literals.rb', line 102

def start
  @start
end

Instance Method Details

#to_sexpObject



110
111
112
# File 'lib/compiler/ast/literals.rb', line 110

def to_sexp
  [:dot2, @start.to_sexp, @finish.to_sexp]
end