opam install . --deps-only --with-test
dune build
dune test
dune exec pirc -- [options] <file>
Then pirc
will parse the file and dump the ASTs to the current terminal (in pretty-printed format by default).
-
-<pprint|json|dot>
: Dump the AST in pretty-printed or JSON format, or generate a DOT file for AST visualization. -
use
-
to read the source code fromstdin
. E.g.:
cat examples/1.pir | dune exec pirc -- -
- use
-o <file>
to write the output to a file. E.g.:
dune exec pirc -- -json examples/1.pir -o out
make docs
Then open pdf files in docs
directory.
-
-
Name your branch
<your-names>/<feature>
-
-
-
You can format your code using
dune fmt
-
-
You can enable repo-wide githooks to make sure your code is formatted and can build
git config core.hooksPath .githooks