Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var ew = function(src){
return BiwaScheme.to_write(BiwaScheme.run(src));
};
var puts = util.puts;
var ev = function(src){
return BiwaScheme.run(src);
};
var ew = function(src){
"command-line": function(){
var list = ev('(command-line)');
assert.ok(BiwaScheme.isList(list));
list.foreach(function(item){
assert.ok(_.isString(item));
});
},
"get-environment-variables": function(){
var first_env = ev('(car (get-environment-variables))');
assert.ok(BiwaScheme.isPair(first_env));
assert.ok(_.isString(first_env.car));
assert.ok(_.isString(first_env.cdr));
}
};
function execute (compiledLisp) {
var onError = function(e){ console.error(e); }
var biwa = new BiwaScheme.Interpreter(onError)
return biwa.evaluate(compiledLisp)
}