class Crass::Tokenizer

def consume_comments

4.3.2. http://dev.w3.org/csswg/css-syntax/#consume-comments

Consumes comments and returns them, or `nil` if no comments were consumed.
def consume_comments
  if @s.peek(2) == '/*'
    @s.consume
    @s.consume
    if text = @s.scan_until(RE_COMMENT_CLOSE)
      text.slice!(-2, 2)
    else
      # Parse error.
      text = @s.consume_rest
    end
    return create_token(:comment, :value => text)
  end
  nil
end