class Crass::Tokenizer

def start_identifier?(text = nil)

4.3.10. http://dev.w3.org/csswg/css-syntax/#would-start-an-identifier

input stream will be checked, but will not be consumed.
identifier. If _text_ is `nil`, the current and next two characters in the
Returns `true` if the given three-character _text_ would start an
def start_identifier?(text = nil)
  text = @s.current + @s.peek(2) if text.nil?
  case text[0]
  when '-'
    nextChar = text[1]
    !!(nextChar == '-' || nextChar =~ RE_NAME_START || valid_escape?(text[1, 2]))
  when RE_NAME_START
    true
  when '\\'
    valid_escape?(text[0, 2])
  else
    false
  end
end