rami3l / dolores

A tree-walking interpreter for the Lox Programming Language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dolores

"... light of my life."

The Lox Programming Language implemented in Rust.

Ported from the original Java-based jlox tree-walking interpreter*, but with no visitor patterns, no null values, no subclasses and implicit conversions, just pure enums.

Gc<T> is a necessary evil...

* : For the bytecode VM interpreter, see rami3l/golox.


Contents


Features

  • Lexer
  • Parser
  • Basic types
  • Floating point arithmetic
  • Logic expressions
  • Control flow
    • Jumps: break/continue**
      • Semantic analysis: jumping out of loops
  • Functions
    • Lambdas**
    • Semantic analysis: returning out of functions
    • Semantic analysis: static closure captures
  • Classes
    • Instances
    • Instance methods
      • this
        • Semantic analysis: this out of classes
      • Initializers
        • Semantic analysis: returning values in initializers
    • Inheritance
      • super
        • Semantic analysis: super out of subclasses

** : Extension

Try it out!

With the latest Rust toolchain installed, just execute:

cargo run

About

A tree-walking interpreter for the Lox Programming Language.


Languages

Language:Rust 100.0%