lost+found/src/pattern.js
function (char, chars) {
                var
                    first,
                    last;
                if ("^" === char) {
                    this._exc = [];
                } else if ("]" === char) {
                    if (this._inRange) {
                        gpf.Error.patternInvalidSyntax();
                    }
                    return true;
                } else if ("-" === char) {
                    if (this._inRange || 0 === chars.length) {
                        gpf.Error.patternInvalidSyntax();
                    }
                    this._inRange = true;
                } else {
                    if (this._inRange) {
                        first = chars[chars.length - 1].charCodeAt(0);
                        last = char.charCodeAt(0);
                        while (--last > first) {
                            chars.push(String.fromCharCode(last));
                        }
                        chars.push(char);
                        delete this._inRange;
                    } else {
                        // First char of a range
                        chars.push(char);
                    }
                }
                return false;
            }
function (char, chars) {
                var
                    first,
                    last;
                if ("^" === char) {
                    this._exc = [];
                } else if ("]" === char) {
                    if (this._inRange) {
                        gpf.Error.patternInvalidSyntax();
                    }
                    return true;
                } else if ("-" === char) {
                    if (this._inRange || 0 === chars.length) {
                        gpf.Error.patternInvalidSyntax();
                    }
                    this._inRange = true;
                } else {
                    if (this._inRange) {
                        first = chars[chars.length - 1].charCodeAt(0);
                        last = char.charCodeAt(0);
                        while (--last > first) {
                            chars.push(String.fromCharCode(last));
                        }
                        chars.push(char);
                        delete this._inRange;
                    } else {
                        // First char of a range
                        chars.push(char);
                    }
                }
                return false;
            }
function ( char , chars ) { var first , last ; if ( "^" === char ) { this . _exc = [ ] ; } else if ( "]" === char ) { if ( this . _inRange ) { gpf . Error . patternInvalidSyntax ( ) ; } return true ; } else if ( "-" === char ) { if ( this . _inRange || 0 === chars . length ) { gpf . Error . patternInvalidSyntax ( ) ; } this . _inRange = true ; } else { if ( this . _inRange ) { first = chars [ chars . length - 1 ] . charCodeAt ( 0 ) ; last = char . charCodeAt ( 0 ) ; while ( -- last > first ) { chars . push ( String . fromCharCode ( last ) ) ; } chars . push ( char ) ; delete this . _inRange ; } else { // First char of a range chars . push ( char ) ; } } return false ; }
Reduce the cyclomatic complexity of parse

@param {String} char Character to parse
@param {String[]} chars Character array of already parsed
chars
@return {Boolean} True means PARSE_PROCESSED_EOP, otherwise
PARSE_PROCESSED is returned
Reduce the cyclomatic complexity of parse