earlgrey
Version:
Programming language compiling to JavaScript, featuring macros, dynamic typing annotations and pattern matching.
4 lines (2 loc) • 1.93 kB
JavaScript
require('earlgrey-runtime/5');var $targ$1=void 0;var module$0=void 0;var path$0=void 0;var vm$0=void 0;var evaluator$0=void 0;module$0=require("module");path$0=require("path");vm$0=require("vm");evaluator$0=function evaluator(options$0){var g$0=void 0;var m$1$0=void 0;var gl$0=void 0;var $targ$0=void 0;var g$1=void 0;var m$0$0=void 0;var accum$0=void 0;var paths$0=void 0;var e_module$0=void 0;var e_require$0=void 0;var setup$0=void 0;var __eval$0=void 0;var req$0=void 0;var glob$0=void 0;req$0=require;if(options$0.globvar){m$0$0=send(global,options$0.globvar);if(m$0$0===void 0){m$1$0=options$0.global;if(m$1$0===true){gl$0=global;}else{if(getChecker(Object)(m$1$0)){g$0=m$1$0;gl$0=g$0;}else{gl$0=Object.create(global);}}$targ$0=gl$0;global[options$0.globvar]=$targ$0;glob$0=gl$0;}else{g$1=m$0$0;glob$0=g$1;}}else{glob$0=global;}if(module$0._nodeModulePaths){if(options$0.cwd){paths$0=module$0._nodeModulePaths(options$0.cwd);}else{paths$0=[];}e_module$0=new module$0(options$0.showname);__amp____colon__(e_module$0,{"filename":options$0.filename,"paths":paths$0});e_require$0=function e_require(path$1){return module$0._load(path$1,e_module$0,true);};__amp____colon__(e_require$0,__amp____colon__({"main":e_module$0},__amp____colon__((accum$0={},accum$0["resolve"]=function resolve(path$2){return module$0._resolveFileName(path$2,e_module$0);},accum$0),{"paths":paths$0,"cache":req$0.cache})));setup$0={"__filename":options$0.filename,"__dirname":path$0.dirname(options$0.filename),"module":e_module$0,"require":e_require$0,"exports":{}};__amp____colon__(glob$0,setup$0);return function(code$0){var script$0=void 0;var rval$0=void 0;script$0=vm$0.createScript(code$0,options$0.showname);rval$0=script$0.runInThisContext();return rval$0;};}else{__eval$0=eval;return function(code$1){return __eval$0(code$1);};}};$targ$1=evaluator$0;exports["evaluator"]=$targ$1;void 0;
//# sourceMappingURL=evaluator.js.map
;