Compiler for the Monkey programming language written in Go.
A Makefile is included for convenience.
Get dependencies with $ go get ./...
.
Generate files with $ make parser
.
Build project with $ make build
.
Flags
- -vm: path to Monkey Virtual Machine binary (required)
- -code: path to Monkey Instructions Code file
- -h: help
Run project with $ make run
or with binary file $ ./compiler -vm="path/to/file"
.
let Main = fn(main) {
// Your code here
}
Base URL: http://locahost:4440/monkeycompiler
Request:
{
"program": string,
}
Response:
{
"errors": []string,
"lines": []int,
"tree": {...},
}
It also creates a file with Monkey Instructions Code in the path specified with the flag -code
.
Request:
Empty
Response:
{
"result": string,
}