var compile = ;var js_string = ;//it can also take an ast as inputvar js_string = ;
Note, this function is synchronous (since there is no I/O) and will throw errors when needed.
The compiler can be used via shell. It takes KRL code in
$ npm install -g krl-compiler$ krl-compiler < in.krl > out.js
USAGEkrl-compiler [--verify] [--no-source-map] [--help, -h]DESCRIPTIONTake krl as stdin and will give js as stdout$ krl-compiler < in.krl > out.jsOPTIONS--no-source-mapDon't append an inline source map in the output--verifyOn valid compilation silently exit with 0On failure write the error to stdout and exit with 1--version, -voutput the version--help, -hDisplay this message