Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 497 Bytes

README.md

File metadata and controls

38 lines (25 loc) · 497 Bytes

visualization of simple AST and stack-based VM

todo

  • add tokenizer
  • add basic error handling

if else statements

var a = 1;
var b = 2;

if(a < b) print "a is less than b";
else print "a is >= b";

print "end of program";

calculate factorial of n

var f = 1;
var a = 5;

while(a > 1) {
  f = f * a;
  a = a - 1;
}

print "factorial: " + f;

screenshot

screenshot

programs run slow due to DOM manipulations