https://github.com/ripta/mwnci
mwnci the monkey language
https://github.com/ripta/mwnci
programming-language toy-interpreter
Last synced: 9 months ago
JSON representation
mwnci the monkey language
- Host: GitHub
- URL: https://github.com/ripta/mwnci
- Owner: ripta
- License: mit
- Created: 2024-01-15T10:14:08.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-15T10:14:46.000Z (about 2 years ago)
- Last Synced: 2025-05-07T22:56:07.750Z (9 months ago)
- Topics: programming-language, toy-interpreter
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
mwnci: an implementation of the Monkey programming language,
which is designed by [Thorsten Ball](https://interpreterbook.com/)
To install:
```
go install github.com/ripta/mwnci/cmd/mwnci@latest
```
To run REPL, just invoke `mwnci`; the REPL does not support multiline input,
e.g., function definitions have to be compressed into one line. The evaluation
result for each line is printed.
To run a file, pass it one or more files, e.g.:
```
❯ mwnci examples/math.mwn
46
```
When running in file mode, per-line results are suppressed. Multiple files are
run in separate environments; no sharing across source files yet.
Some differences compared to the reference implementation:
- file mode in addition to REPL mode
- multibyte runes
- 64-bit floats
- line numbers in errors (incomplete)