Skip to content
/ rlox Public

Rust implementation of the Lox language from Crafting Interpreters

Notifications You must be signed in to change notification settings

julioolvr/rlox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rlox

status

Interpreter for the Lox language from craftinginterpreters.com written in Rust.

This roughly follows the Java implementation (at the moment of this writing the C implementation isn't available). There are many bugs to be found and ways to improve the code, but it works fairly well!

Usage

# Run Lox's REPL
cargo run

# Execute a Lox file
cargo run -- some_file.lox

Samples

There are some code samples going around in the tests, but I wrote a couple of small lox scripts that can be used to test the interpreter - they can be found in samples/, e.g.

cargo run -- samples/closures.lox

Playground

rlox is available online thanks to the wonders of WebAssembly. Check it out at rlox-wasm.now.sh.

About

Rust implementation of the Lox language from Crafting Interpreters

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published