Class: Rubinius::AST::SymbolLiteral

Inherits:
Node
  • Object
show all
Defined in:
lib/compiler/ast/literals.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, sym) ⇒ SymbolLiteral

Returns a new instance of SymbolLiteral.



65
66
67
68
# File 'lib/compiler/ast/literals.rb', line 65

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

Instance Attribute Details

#valueObject

Returns the value of attribute value.



63
64
65
# File 'lib/compiler/ast/literals.rb', line 63

def value
  @value
end

Instance Method Details

#to_sexpObject



70
71
72
# File 'lib/compiler/ast/literals.rb', line 70

def to_sexp
  [:lit, @value]
end