class CodeRay::Encoders::Debug

def text_token text, kind

def text_token text, kind
  if kind == :space
    @out << text
  else
    text = text.gsub('\\', '\\\\\\\\') if text.index('\\')
    text = text.gsub(')',  '\\\\)')    if text.index(')')
    @out << "#{kind}(#{text})"
  end
end