https://github.com/makramkd/go-monkey
https://github.com/makramkd/go-monkey
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/makramkd/go-monkey
- Owner: makramkd
- Created: 2021-09-07T19:13:07.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-09-15T18:09:28.000Z (over 3 years ago)
- Last Synced: 2024-06-21T08:11:34.977Z (11 months ago)
- Language: Go
- Size: 51.8 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-monkey
[Monkey](https://monkeylang.org/) is the programming language outlined in Thorsten Ball's [Writing an Interpreter in Go](https://interpreterbook.com/).
It's a small language that is meant to serve as an educational vehicle for teaching the basics of compilation and interpretation of high level code.
This is a Go implementation that closely follows the implementation in the book but has a few extensions:
* A minimal standard library and module system,
* For-each loops for both arrays and dictionaries,
* Possibly more, depending on what I come up with :)## Building, Running the REPL and Tests
To build the top level interpreter, run the following after checking out the project:
```bash
go build ./cmd/monkeyc/
# or: go build .\cmd\monkeyc\ on Windows machines.
```Run unit tests:
```bash
go test -cover ./...
```Run the REPL:
```bash
./monkeyc
# or: .\monkeyc.exe on Windows
```