Finished implementing Netscript. Not completely tested yet. Find out how to make it multithreaded (Web Workers is the best way according to internet

This commit is contained in:
Daniel Xie
2016-11-17 16:25:40 -06:00
parent a4f92f7520
commit 8d87b74eaf
10 changed files with 544 additions and 109 deletions
+13
View File
@@ -289,6 +289,19 @@ var Terminal = {
case "scp":
//TODO
break;
case "test":
//TODO
//TESTED: print, for loops
//UNTESTED:
var code = "i = 0; while (i < 100000000000) {print(i); i = i+1;}";
var ast = Parser(Tokenizer(InputStream(code)));
console.log("Printing AST below")
console.log(ast);
var globalEnv = new Environment();
evaluate(ast, globalEnv);
break;
default:
post("Command not found");
}