Skip to content

Latest commit

 

History

History
20 lines (17 loc) · 267 Bytes

README.md

File metadata and controls

20 lines (17 loc) · 267 Bytes

Lox language

Example:

fun makeCounter() {
  var a = 0;
  fun count() {
    a = a + 1;
    return a;
  }
  return count;
}

var count = makeCounter();
print count();
print count();
print count();

VM's instruction set is defined in chunk.h