Skip to content

Latest commit

 

History

History
7 lines (4 loc) · 1.38 KB

README.md

File metadata and controls

7 lines (4 loc) · 1.38 KB

Rustle Lang

This is a little toy language I built out to familiarize myself with the process of lexing, parsing, and interpreting. It hews pretty closely to Robert Nystrom's Lox language; I followed the lessons taught in his Crafting Interpreters book (thanks Bob, if you ever read this!) and adapted it to Rust as best I could. I wanted to give myself a challenge to try to grow my Rust expertise - the ownership/lifetime problem in a language parsing setting seemed like a unique exercise - and I learned a lot and definitely had fun putting all the pieces together. That said, there's plenty of room for improvement: I'm sure I can resolve my (admittedly) somewhat liberal use of cloning, and I'd be curious to look into I/O implementation and different logging/error reporting techniques too.

I also wrote (once following in Bob Nystrom's footsteps...) a followup bytecode VM written in C++. Still a work in progress, I've yet to implement closures as well as class instantiation/inheritance, but it's coming along nicely. Much faster than the high level Rust parser already, and I still have plenty of work to do to bring those benchmarks down.

I was also curious about what goes on behind the scenes in VSCode extensions, so I built out a language grammar extension to familiarize myself with the extension building process, with the added benefit of implementing syntax highlighting for my .rsl files.