class Cucumber::CucumberExpressions::Token

def self.can_escape(codepoint)

def self.can_escape(codepoint)
  c = codepoint.chr(Encoding::UTF_8)
  if c == ' '
    # TODO: Unicode whitespace?
    return true
  end
  case c
  when ESCAPE_CHARACTER
    true
  when ALTERNATION_CHARACTER
    true
  when BEGIN_PARAMETER_CHARACTER
    true
  when END_PARAMETER_CHARACTER
    true
  when BEGIN_OPTIONAL_CHARACTER
    true
  when END_OPTIONAL_CHARACTER
    true
  else
    false
  end
end