Skip to content

Clojure implementation of `jlox` interpreter for the Lox programming language

License

Notifications You must be signed in to change notification settings

narimiran/cljox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cljox

A Clojure implementation of jlox interpreter for the Lox programming language from the Crafting Interpreters book by Bob Nystrom.

Instead of the original Java-style, the code here is written in a functional style, with some ideas stolen inspired by Ceronman's Cloxure implementation. This was my first time to use Clojure's protocols, and multimethods are such a no-brainer instead of the visitor pattern.

I tried to keep the git history as clean as possible (nobody will ever know about the existence of all that fighting with subtle bugs, interactive rebases, fixups, etc., right?), with each git commit stating the chapter of the book it is related to, in case somebody stumbles upon this repo and wants to have a Clojure code to read in parallel with the book content.

A note about performance: The execution speed was not my goal, and it shows. Run the benchmarks at your own risk.

About

Clojure implementation of `jlox` interpreter for the Lox programming language

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published