Class: Rubinius::AST::ToString

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

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, value) ⇒ ToString

Returns a new instance of ToString.



76
77
78
79
# File 'lib/compiler/ast/values.rb', line 76

def initialize(line, value)
  @line = line
  @value = value
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



74
75
76
# File 'lib/compiler/ast/values.rb', line 74

def value
  @value
end

Instance Method Details

#to_sexpObject



81
82
83
84
85
# File 'lib/compiler/ast/values.rb', line 81

def to_sexp
  sexp = [:evstr]
  sexp << @value.to_sexp if @value
  sexp
end