This repository contains a Rust implementation of the book "Writing An Interpreter In Go" by Thorsten Ball. The book walks through the process of building an interpreter for a simple programming language using the Go programming language. In this repository, I aim to replicate the interpreter using Rust.
The primary motivation behind this project is to learn about interpreters and gain a deeper understanding of the concepts and techniques taught in the book.
- Lexer: Tokenizes input source code into meaningful tokens.
- Parser: Parses the tokens into an abstract syntax tree (AST).
- Evaluator: Evaluates the AST and performs computations according to the programming language's rules.
To run the interpreter, follow these steps:
- Clone this repository to your local machine.
git clone https://github.com/DaAlbrecht/interpreter.git
- Navigate to the project directory.
cd interpreter
- Build and run the interpreter.
cargo run