Skip to content
/ dolores Public

A tree-walking interpreter for the Lox Programming Language.

Notifications You must be signed in to change notification settings

rami3l/dolores

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Languages