This repository contains an implementation of the Lox programming language interpreter as part of the "Build Your Own Interpreter" challenge from codecrafters. This Challenge follows the book - Crafting Interpreter by Robert Nystrom
The Lox interpreter is built using Go and follows the principles of Test-Driven Development (TDD). It uses a recursive descent parser to convert a stream of lexical tokens into an Abstract Syntax Tree (AST).
Please make sure you have Go 1.22 installed on your machine.
Clone the repository:
git clone https://github.com/harish876/lox-lang.git
cd lox-lang
```sh
git add.
git commit -m "pass 1st stage" # any msg
git push origin master
It's time to move on to the next stage!
- Add additional grammar rules and code to parser/parser.go
- Add test cases to parser/parser_test.go
- cd cmd/myinterpreter/parser and run
go test
to run all test cases orgo test -run [test_name]
to run a particular test.
- Adding functions, statements, variable binding, classes ( Completing AST - full language feature set )
- Converting to Bytecode and running on a VM (future goal)