Skip to content

wiseodd/rustlox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yet Another Lox Interpreter

Another Rust implementation of Lox, the language introduced in Crafting Interpreters by Robert Nystrom.

Tip

What makes this unique: Nothing! This Lox interpreter is just a vessel I use to learn Rust. Expect non-idiomatic and unsafe Rust here and there! Nevertheless, this might be useful to people who also follows the book with Rust.

Important

Unlike other Rust implementations out there, I don't use the Visitor pattern used in the book. It's all full on pattern matching.

Setup

  1. Install Rust
  2. REPL: cargo run
  3. Executing .lox script: cargo run -- your_script.lox

Tip

Check out playground dir. It contains some example Lox scripts. Run via cargo run -- playground/{script_name}.lox

References

  1. Nystrom, Robert. Crafting interpreters. Genever Benning, 2021. [Link]

About

Lox interpreter in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages