Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 806 Bytes

README.md

File metadata and controls

47 lines (29 loc) · 806 Bytes

loxide

An implementation of Lox from Crafting Interpreters.

Current Progress

Finished Chapter 7.

Currently the compiler will tokenise the source, and then parse a single top-level expression. If it encounters an error it will print it to the screen. It then uses a tree-walk interpreter to evaluate the expression, and prints the result to the screen.

Building

Requirements

  • Rust 2021 Edition (1.60.0+)
  • Cargo (1.60.0+)

Building

cargo build

Running

cargo run

Usage

Interactive Mode

Running the program without any arguments will start the interactive mode.

lox >

File Mode

You can also run the program with a file as the first argument.

cargo run examples/hello_world.lox