This bootstrap consists of:
- package.json - obviously, basic npm manifest with needed modules.
- syntax.jison - syntax of your language in Jison format with minimal needed helpers for building JS source nodes.
- VM.js - "virtual machine" object for initialization logic and methods or properties that can be used by generated code; in most cases you will need such object for simplicity of actual generated code.
- sample.txt - sample input file for compiler.
- options.js - command line option handler, it can be used "as is" in almost any child project but you can add own options if needed here.
- index.js - actually compiler runner; currently it generates parser from .jison syntax on each execution, and for better performance it's recommended to disable this in release when your syntax is completely defined.
compile2js> node . Usage: compile2js [options] Options: -h, --help output usage information -V, --version output the version number -i, --input <source> specify input file -o, --output <js> specify output file (default: <input>.js) -a, --ast [json] save AST (default path: <output>.json) -m, --source-map [map] generate source map (default path: <output>.js.map) -r, --runner [html] generate HTML runner (default path: <output>.html) -d, --debug output debug information