Skip to content

penelopeysm/Lox.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lox.jl

Crafting Interpreters, but in Julia.

interpreter

The first half of the book (tree-walk interpreter).

Run with

cd interpreter
julia --project=. interpreter.jl [LOX_FILE]

where LOX_FILE is a file containing Lox code, or leave it empty to enter the REPL.

Some sample Lox programmes are given in the loxprogs folder.

From inside Julia

To mitigate the TTFX on loading the REPL, you can also run

using LoxInterpreter; run_prompt()

Ctrl-D will return you to the Julia REPL; if you have Revise.jl loaded you can call run_prompt() again and your changes will be reflected.

To run a file from the Julia REPL:

using LoxInterpreter; run_file("path/to/lox_file.lox")

About

Crafting Interpreters, but in Julia

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages