bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(first, startLine, startCol) {
        var reader  = this._reader,
            value   = this.readNumber(first),
            ident,
            tt      = Tokens.NUMBER,
            c       = reader.peek();

        if (isIdentStart(c)) {
            ident = this.readName(reader.read());
            value += ident;

            if (/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vmax$|^vmin$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(ident)) {
                tt = Tokens.LENGTH;
            } else if (/^deg|^rad$|^grad$|^turn$/i.test(ident)) {
                tt = Tokens.ANGLE;
            } else if (/^ms$|^s$/i.test(ident)) {
                tt = Tokens.TIME;
            } else if (/^hz$|^khz$/i.test(ident)) {
                tt = Tokens.FREQ;
            } else if (/^dpi$|^dpcm$/i.test(ident)) {
                tt = Tokens.RESOLUTION;
            } else {
                tt = Tokens.DIMENSION;
            }

        } else if (c === "%") {
            value += reader.read();
            tt = Tokens.PERCENTAGE;
        }

        return this.createToken(tt, value, startLine, startCol);
    }
function(first, startLine, startCol) {
        var reader  = this._reader,
            value   = this.readNumber(first),
            ident,
            tt      = Tokens.NUMBER,
            c       = reader.peek();

        if (isIdentStart(c)) {
            ident = this.readName(reader.read());
            value += ident;

            if (/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vmax$|^vmin$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(ident)) {
                tt = Tokens.LENGTH;
            } else if (/^deg|^rad$|^grad$|^turn$/i.test(ident)) {
                tt = Tokens.ANGLE;
            } else if (/^ms$|^s$/i.test(ident)) {
                tt = Tokens.TIME;
            } else if (/^hz$|^khz$/i.test(ident)) {
                tt = Tokens.FREQ;
            } else if (/^dpi$|^dpcm$/i.test(ident)) {
                tt = Tokens.RESOLUTION;
            } else {
                tt = Tokens.DIMENSION;
            }

        } else if (c === "%") {
            value += reader.read();
            tt = Tokens.PERCENTAGE;
        }

        return this.createToken(tt, value, startLine, startCol);
    }
function ( first , startLine , startCol ) { var reader = this . _reader , value = this . readNumber ( first ) , ident , tt = Tokens . NUMBER , c = reader . peek ( ) ; if ( isIdentStart ( c ) ) { ident = this . readName ( reader . read ( ) ) ; value += ident ; if ( / ^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vmax$|^vmin$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$ / i . test ( ident ) ) { tt = Tokens . LENGTH ; } else if ( / ^deg|^rad$|^grad$|^turn$ / i . test ( ident ) ) { tt = Tokens . ANGLE ; } else if ( / ^ms$|^s$ / i . test ( ident ) ) { tt = Tokens . TIME ; } else if ( / ^hz$|^khz$ / i . test ( ident ) ) { tt = Tokens . FREQ ; } else if ( / ^dpi$|^dpcm$ / i . test ( ident ) ) { tt = Tokens . RESOLUTION ; } else { tt = Tokens . DIMENSION ; } } else if ( c === "%" ) { value += reader . read ( ) ; tt = Tokens . PERCENTAGE ; } return this . createToken ( tt , value , startLine , startCol ) ; }
Produces a number token based on the given character
and location in the stream. This may return a token of
NUMBER, EMS, EXS, LENGTH, ANGLE, TIME, FREQ, DIMENSION,
or PERCENTAGE.
@param {String} first The first character for the token.
@param {int} startLine The beginning line for the character.
@param {int} startCol The beginning column for the character.
@return {Object} A token object.
@method numberToken
Produces a number token based on the given character and location in the stream . This may return a token of NUMBER EMS EXS LENGTH ANGLE TIME FREQ DIMENSION or PERCENTAGE .