lib/less/parser/parser.js
function parseNode(str, parseList, currentIndex, fileInfo, callback) {
        var result, returnNodes = [];
        var parser = parserInput;

        try {
            parser.start(str, false, function fail(msg, index) {
                callback({
                    message: msg,
                    index: index + currentIndex
                });
            });
            for (var x = 0, p, i; (p = parseList[x]); x++) {
                i = parser.i;
                result = parsers[p]();
                if (result) {
                    result._index = i + currentIndex;
                    result._fileInfo = fileInfo;
                    returnNodes.push(result);
                }
                else {
                    returnNodes.push(null);
                }
            }

            var endInfo = parser.end();
            if (endInfo.isFinished) {
                callback(null, returnNodes);
            }
            else {
                callback(true, null);
            }
        } catch (e) {
            throw new LessError({
                index: e.index + currentIndex,
                message: e.message
            }, imports, fileInfo.filename);
        }
    }
function parseNode(str, parseList, currentIndex, fileInfo, callback) {
        var result, returnNodes = [];
        var parser = parserInput;

        try {
            parser.start(str, false, function fail(msg, index) {
                callback({
                    message: msg,
                    index: index + currentIndex
                });
            });
            for (var x = 0, p, i; (p = parseList[x]); x++) {
                i = parser.i;
                result = parsers[p]();
                if (result) {
                    result._index = i + currentIndex;
                    result._fileInfo = fileInfo;
                    returnNodes.push(result);
                }
                else {
                    returnNodes.push(null);
                }
            }

            var endInfo = parser.end();
            if (endInfo.isFinished) {
                callback(null, returnNodes);
            }
            else {
                callback(true, null);
            }
        } catch (e) {
            throw new LessError({
                index: e.index + currentIndex,
                message: e.message
            }, imports, fileInfo.filename);
        }
    }
function parseNode ( str , parseList , currentIndex , fileInfo , callback ) { var result , returnNodes = [ ] ; var parser = parserInput ; try { parser . start ( str , false , function fail ( msg , index ) { callback ( { message : msg , index : index + currentIndex } ) ; } ) ; for ( var x = 0 , p , i ; ( p = parseList [ x ] ) ; x ++ ) { i = parser . i ; result = parsers [ p ] ( ) ; if ( result ) { result . _index = i + currentIndex ; result . _fileInfo = fileInfo ; returnNodes . push ( result ) ; } else { returnNodes . push ( null ) ; } } var endInfo = parser . end ( ) ; if ( endInfo . isFinished ) { callback ( null , returnNodes ) ; } else { callback ( true , null ) ; } } catch ( e ) { throw new LessError ( { index : e . index + currentIndex , message : e . message } , imports , fileInfo . filename ) ; } }
Used after initial parsing to create nodes on the fly

@param {String} str          - string to parse
@param {Array}  parseList    - array of parsers to run input through e.g. ["value", "important"]
@param {Number} currentIndex - start number to begin indexing
@param {Object} fileInfo     - fileInfo to attach to created nodes
Used after initial parsing to create nodes on the fly