Class: StrLitNode

Inherits:
Node
  • Object
show all
Defined in:
lib/code_generator.rb

Instance Method Summary collapse

Methods inherited from Node

#column

Constructor Details

#initialize(val) ⇒ StrLitNode

Returns a new instance of StrLitNode.



122
# File 'lib/code_generator.rb', line 122

def initialize val; super(val); end

Instance Method Details

#genObject



124
125
126
127
128
129
130
131
132
# File 'lib/code_generator.rb', line 124

def gen
  #FIXME HACK
  if @value.respond_to? :gen
    val = @value.gen
  else
    val = @value
  end
  val.gsub(/^'(.*)'$/, '\1')
end