diff --git a/src/Netscript/Evaluator.js b/src/Netscript/Evaluator.js index 827c4be2c..d057f6053 100644 --- a/src/Netscript/Evaluator.js +++ b/src/Netscript/Evaluator.js @@ -2,7 +2,6 @@ * Evaluates the Abstract Syntax Tree for Netscript * generated by the Parser class */ - function evaluate(exp, env) { switch (exp.type) { case "num": diff --git a/src/Script.js b/src/Script.js index 11a95ef44..c7021a7fe 100644 --- a/src/Script.js +++ b/src/Script.js @@ -112,6 +112,11 @@ Script.prototype.saveScript = function() { } } +Script.prototype.queueEvaluate = function(exp, env) { + var fooObj = functionObject(evaluate, this, [exp, env]); + this.functionQueue.push(fooObj); +} + /* Wrapper object that wraps a function with its arguments. * These objects are pushed onto a Script object's function queue. * The functions can be called with the standard () operator