Class: Rubinius::AST::StringLiteral

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

Direct Known Subclasses

DynamicString, ExecuteString

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, str) ⇒ StringLiteral

Returns a new instance of StringLiteral.



144
145
146
147
# File 'lib/compiler/ast/literals.rb', line 144

def initialize(line, str)
  @line = line
  @string = str
end

Instance Attribute Details

#stringObject

Returns the value of attribute string.



142
143
144
# File 'lib/compiler/ast/literals.rb', line 142

def string
  @string
end

Instance Method Details

#to_sexpObject



149
150
151
# File 'lib/compiler/ast/literals.rb', line 149

def to_sexp
  [:str, @string]
end