Skip to content

Garkatron/Rust-Lox-Interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Rox

🦀 A badly written Rust Lox tree-walk interpreter

I started this project because I wanted to learn how programming languages work under the hood. I already know Java and enjoy it, but I was looking for something more challenging — so I decided to write it in Rust, a very different language I’ve been wanting to learn and practice.

⚠️ Warning: This code is full of design mistakes and bad practices, especially around variable references. Use it at your own risk! I don’t recommend it for learning — it’s a playground, not a guide.

🙏 Special thanks to Robert Nystrom
📖 https://craftinginterpreters.com


🚀 Features

Tokens

Grammar

  • EXTRA: Comma operator
  • EXTRA: Ternary operator

Lexer

  • EXTRA: Multiline comments

Parser

Expressions

Statements

Interpreter

  • ✅ Global variables
  • EXTRA: Comma operator (not yet implemented)
  • EXTRA: Ternary operator

Object-Oriented Programming (OOP)

  • pub (public/private methods)
  • static (class/static methods)
  • ✅ Inheritance

❌ Extended STD

Lox Language Support

🛠️ Custom Features

  • loop {} block
  • while {} else {} block

📚 Based On

📖 Crafting Interpreters


About

A badly written Rust Lox tree-walk interpreter

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors