Hacked the sandbox to expose a parse() method

The sandbox will be going shortly, it's convenient at the moment though
print-window-tiddler
Jeremy Ruston 2012-01-03 11:08:41 +00:00
rodzic 06f9887d59
commit 3515016a7e
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -15,6 +15,10 @@ var Sandbox = function(parserText) {
this.parser = pegjs.buildParser(parserText);
};
Sandbox.prototype.parse = function(code) {
return this.parser.parse(code);
}
Sandbox.prototype.execute = function(code,globals) {
var globalNames = [],
globalValues = [],