taintable/dynamic_taint/jalangi/src/js/instrument/esnstrument.js
// END of Liang Gong's AST post-processor
END of Liang Gong's AST post-processor
END of Liang Gong ' s AST post - processor
function transformString(code, visitorsPost, visitorsPre) {
        var newAst = acorn.parse(code, { locations:true, allowHashBang:true, ecmaVersion:6, allowImportExportEverywhere:true });
        addScopes(newAst);
        var len = visitorsPost.length;
        for (var i = 0; i < len; i++) {
            newAst = astUtil.transformAst(newAst, visitorsPost[i], visitorsPre[i], astUtil.CONTEXT.RHS);
        }
        return newAst;
    }
function transformString ( code , visitorsPost , visitorsPre ) { var newAst = acorn . parse ( code , { locations : true , allowHashBang : true , ecmaVersion : 6 , allowImportExportEverywhere : true } ) ; addScopes ( newAst ) ; var len = visitorsPost . length ; for ( var i = 0 ; i < len ; i ++ ) { newAst = astUtil . transformAst ( newAst , visitorsPost [ i ] , visitorsPre [ i ] , astUtil . CONTEXT . RHS ) ; } return newAst ; }
END of Liang Gong's AST post-processor
END of Liang Gong ' s AST post - processor
//         StatCollector.resumeTimer("parse"); //        console.time("parse") //        var newAst = esprima.parse(code, {loc:true, range:true}); //        console.timeEnd("parse") //        StatCollector.suspendTimer("parse"); //        StatCollector.resumeTimer("transform"); //        console.time("transform") //        console.timeEnd("transform") //        StatCollector.suspendTimer("transform"); //        console.log(JSON.stringify(newAst,null,"  "));