Basically a compiler, written in OCaml, that transpiles from GoLite (subset of Go) to WebAssembly text format (S-expressions).
- To build the compiler, go to
src/
and executemake
. (dependencies:menhir
,ocamlfind
,ocamlbuild
)
- To remove the compiler build directory and other files, go to
src/
and executemake clean
.
- To run the compiler for a program, execute
<path_to_src>/main.native [lex|parse|weed|pretty|type|compile] [-dumpsymtab] [-pptype] [-h] [-v] <path_to_programs>/foo/bar.go
. - If no action is provided, it'll default to code generation in this milestone.
- If additional flags are set, the output file will be in the same directory as the input file.
- Go to
programs/
and executedotests.sh [lex|parse|weed|pretty|type]
.