Language Which Compiles To BBJ
Import the package, and call the parse
method to get an AST. Use npm test
to test.
Note: only --emit-parse and --emit-bin are currently supported. --emit-text is currently unimplemented and will be ignored
lwctbc
is a command-line interface for the LWCTB compiler. There is currently no automatic setup; you must set up the compiler on your own. Here are instructions for that:
- Clone this repo.
- Run
npm install -O
* to install optional dependencies. Build withnpm run build
. - Create a script
lwctbc
:
- Windows:
node build/cli.js -- %*
- Linux:
node build/cli.js -- $*
- Add it to the
PATH
for convenience. - (Optional, will be guessed if omitted) Set environment variable
LWCTBC_PLATFORM
to your platform.w
orwindows
for Windows,l
orlinux
for Linux. If you want to use MinGW with LWCTB, set your platform to Linux. - Set up the standard library: set environment variable
LWCTBC_STD_DIR
to thelwctbc-std
directory in this repo. Alternatively, you can choose a different stdlib (this is useful if you are developing LWCTB) - Profit.
* TODO: is that correct?