#lox #scanner #interpreter #parser #language

bin+lib lox_one

A tree-walking interpreter for the Lox programming language

1 unstable release

Uses new Rust 2021

0.1.0 Oct 9, 2022

#933 in Development tools

MIT license

82KB
2.5K SLoC

lox-one

This is simple tree-walking interpreter for the Lox language.

This repo implements the jlox interpreter from the great Crafting Interpreters book by the awesome Bob Nystrom.

Progress

  • Scanner
  • Parser
  • Environment
  • Variables
  • Conditionals if/else
  • Loops (for and while loops)
  • Functions (first-class, closures)
  • Resolver
  • Classes
  • Inheritance

Later Ideas

I think if I can get done with the book I will add:

  • Lists
  • Hashmaps
  • Operator Overloading
  • TypeScript style type-checking

Dependencies

~2.4–3.5MB
~75K SLoC