def consume_numeric
      number = consume_number

      if start_identifier?(@s.peek(3))
        create_token(:dimension,
          :repr  => number[0],
          :type  => number[2],
          :unit  => consume_name,
          :value => number[1])

      elsif @s.peek == '%'
        @s.consume

        create_token(:percentage,
          :repr  => number[0],
          :type  => number[2],
          :value => number[1])

      else
        create_token(:number,
          :repr  => number[0],
          :type  => number[2],
          :value => number[1])
      end
    end
def consume_numeric
      number = consume_number

      if start_identifier?(@s.peek(3))
        create_token(:dimension,
          :repr  => number[0],
          :type  => number[2],
          :unit  => consume_name,
          :value => number[1])

      elsif @s.peek == '%'
        @s.consume

        create_token(:percentage,
          :repr  => number[0],
          :type  => number[2],
          :value => number[1])

      else
        create_token(:number,
          :repr  => number[0],
          :type  => number[2],
          :value => number[1])
      end
    end
Consumes a numeric token and returns it.

 4.3.3. http://dev.w3.org/csswg/css-syntax/#consume-a-numeric-token