Skip to content
/ zlox Public

A bytecode virtual machine implementation of the Lox language interpreter, written in Zig.

Notifications You must be signed in to change notification settings

quangd42/zlox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zlox

A bytecode virtual machine implementation of the Lox language interpreter, written in Zig.

This is the implementation for second half of the book Crafting Interpreters. For the first half, a tree-walk interpreter implementation written in Go can be found here.

Usage

Zig 0.14 is required to build and run this project.

# build
zig build -Doptimize=ReleaseSafe -Dnan-boxing
# the binary is stored in zig-out/bin by default
# omit the file path to kick off the repl
./zig-out/bin/zlox test/field/get_and_set_method.lox

About

A bytecode virtual machine implementation of the Lox language interpreter, written in Zig.

Resources

Stars

Watchers

Forks