static NumericSign getSign(CSSTokenizerInputStream& input, unsigned& offset)
{
    if (input.nextInputChar() == '+') {
        ++offset;
        return PlusSign;
    }
    if (input.nextInputChar() == '-') {
        ++offset;
        return MinusSign;
    }
    return NoSign;
}
예제 #2
0
static int getSign(CSSTokenizerInputStream& input, unsigned& offset)
{
    int sign = 1;
    if (input.nextInputChar() == '+') {
        ++offset;
    } else if (input.peek(offset) == '-') {
        sign = -1;
        ++offset;
    }
    return sign;
}