interpreter/index.js
function findPreprocs(inst, list, procs, parts) {
    if (Array.isArray(list)) {
        while (list.length > 0) {
            var part = list.shift();
            // Preprocessors must be the first elements in the list;
            // if we hit any non-preprocessors, immediately assume
            // we're done preprocessing and can move on with execution
            // This is as opposed to doing something like hoisting
            if (!_isFunc(part)) {
                list.unshift(part);
                break;
            }
            var name = _getFnName(part);
            var lookup = inst.library.lookupPreprocessor(name);

            if (!lookup) {
                list.unshift(part);
                break;
            }
            if (lookup) {
                parts.push(part);
                procs.push(lookup);
            }
        }
    }
    return {
        list: list,
        parts: parts,
        procs: procs
    };
}
function findPreprocs(inst, list, procs, parts) {
    if (Array.isArray(list)) {
        while (list.length > 0) {
            var part = list.shift();
            // Preprocessors must be the first elements in the list;
            // if we hit any non-preprocessors, immediately assume
            // we're done preprocessing and can move on with execution
            // This is as opposed to doing something like hoisting
            if (!_isFunc(part)) {
                list.unshift(part);
                break;
            }
            var name = _getFnName(part);
            var lookup = inst.library.lookupPreprocessor(name);

            if (!lookup) {
                list.unshift(part);
                break;
            }
            if (lookup) {
                parts.push(part);
                procs.push(lookup);
            }
        }
    }
    return {
        list: list,
        parts: parts,
        procs: procs
    };
}
function findPreprocs ( inst , list , procs , parts ) { if ( Array . isArray ( list ) ) { while ( list . length > 0 ) { var part = list . shift ( ) ; // Preprocessors must be the first elements in the list; // if we hit any non-preprocessors, immediately assume // we're done preprocessing and can move on with execution // This is as opposed to doing something like hoisting if ( ! _isFunc ( part ) ) { list . unshift ( part ) ; break ; } var name = _getFnName ( part ) ; var lookup = inst . library . lookupPreprocessor ( name ) ; if ( ! lookup ) { list . unshift ( part ) ; break ; } if ( lookup ) { parts . push ( part ) ; procs . push ( lookup ) ; } } } return { list : list , parts : parts , procs : procs } ; }
Find all preprocessors in the given program
Find all preprocessors in the given program