class Unparser::Emitter::DSym

Dynamic symbol literal emitter

def dispatch

def dispatch
  write(':"')
  children.each do |child|
    case child.type
    when :str
      emit_str_child(child)
    when :begin
      emit_begin_child(child)
    end
  end
  write('"')
end

def emit_begin_child(component)

def emit_begin_child(component)
  write('#{')
  visit(Util.one(component.children)) if component.children.any?
  write('}')
end

def emit_str_child(value)

def emit_str_child(value)
  string = value.children.first
  if string.end_with?("\n")
    write(string.inspect[1..-4])
    nl
  else
    write(string.inspect[1..-2])
  end
end