Skip to content

mcadariu/jlox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jlox

This repo contains the implementation of a tree-walking interpreter for Lox, a general-purpose object-oriented language from Crafting Interpreters.

It can run programs like:

class Vehicle {
    init(brand) {
        this.brand = brand;
    }

    describe() {
        return "This is a " + this.brand;
    }
}

class Car < Vehicle {
    init(brand, model) {
        super.init(brand);
        this.model = model;
    }

    describe() {
        return super.describe() + " " + this.model;
    }
}

var myCar = Car("Toyota", "Camry");
print myCar.describe();

About

A tree-walking interpreter in Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages