Skip to content

Rust implementation of the tree-walk interpreter from "Crafting Interpreters" by Robert Nystrom

License

Notifications You must be signed in to change notification settings

sagark4/rlox_ast_walk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rlox_ast_walk

This is my first Rust project through which I learned Rust.

This is a Rust implementation of the tree-walk interpreter from the AMAZING book Crafting Interpreters by Robert Nystrom. The original implementation in the book is in Java, and I decided to write a Rust version to learn Rust, so I'm sure the code is not highest quality.

If you have Rust installed, from the directory of this repo do the following for a Lox interpreter

cargo run

or to run a Lox script, say, fib.lox, do the following

cargo run fib.lox

That's it! 🍉

Shameless plug: I gave a talk at the Rust Vienna meetup on the visitor pattern, based on my experience doing this implementation. You can find the slides here.

About

Rust implementation of the tree-walk interpreter from "Crafting Interpreters" by Robert Nystrom

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published