lib/cssparser.js
function(matcher){

        var source = this._input.substring(this._cursor),
            value = null;

        //if it's a string, just do a straight match
        if (typeof matcher === "string"){
            if (source.indexOf(matcher) === 0){
                value = this.readCount(matcher.length);
            }
        } else if (matcher instanceof RegExp){
            if (matcher.test(source)){
                value = this.readCount(RegExp.lastMatch.length);
            }
        }

        return value;
    }
function(matcher){

        var source = this._input.substring(this._cursor),
            value = null;

        //if it's a string, just do a straight match
        if (typeof matcher === "string"){
            if (source.indexOf(matcher) === 0){
                value = this.readCount(matcher.length);
            }
        } else if (matcher instanceof RegExp){
            if (matcher.test(source)){
                value = this.readCount(RegExp.lastMatch.length);
            }
        }

        return value;
    }
function ( matcher ) { var source = this . _input . substring ( this . _cursor ) , value = null ; //if it's a string, just do a straight match if ( typeof matcher === "string" ) { if ( source . indexOf ( matcher ) === 0 ) { value = this . readCount ( matcher . length ) ; } } else if ( matcher instanceof RegExp ) { if ( matcher . test ( source ) ) { value = this . readCount ( RegExp . lastMatch . length ) ; } } return value ; }
Reads characters that match either text or a regular expression and
returns those characters. If a match is found, the row and column
are adjusted; if no match is found, the reader's state is unchanged.
reading or false to stop.
@param {String|RegExp} matchter If a string, then the literal string
value is searched for. If a regular expression, then any string
matching the pattern is search for.
@return {String} The string made up of all characters that matched or
null if there was no match.
@method readMatch
Reads characters that match either text or a regular expression and returns those characters . If a match is found the row and column are adjusted ; if no match is found the reader s state is unchanged . reading or false to stop .