vendor/node_modules/wisp/engine/browser.js in ruby-wisp-source-0.7.0 vs vendor/node_modules/wisp/engine/browser.js in ruby-wisp-source-0.8.0

- old
+ new

@@ -1,24 +1,18 @@ -var str = (require("../runtime")).str;; +var _ns_ = "wisp.engine.browser"; +module.namespace = _ns_; +var str = (require("./../runtime")).str; +var rest = (require("./../sequence")).rest; +var readFromString = (require("./../reader")).readFromString; +var compile_ = (require("./../compiler")).compile_;; -var rest = (require("../sequence")).rest;; - -var readFromString = (require("../reader")).readFromString;; - -var compileProgram = (require("../compiler")).compileProgram;; - -var transpile = function transpile(source, uri) { - return "" + (compileProgram(rest(readFromString("" + "(do " + source + ")", uri)))) + "\n"; -}; -exports.transpile = transpile; - var evaluate = function evaluate(code, url) { - return eval(transpile(code, url)); + return eval(compile_(read_(code, url))); }; exports.evaluate = evaluate; var run = function run(code, url) { - return (Function(transpile(code, url)))(); + return (Function(compile_(read_(code, url))))(); }; exports.run = run; var load = function load(url, callback) { var request = window.XMLHttpRequest ?