Analyze Tzo code (Standard Representation and ConciseText formats) and emit various details/statistics/formats.
Currently, the main thing this does is analyze Tzo code and return a nice syntax tree.
Can also be used as a library and imported.
- make sure you have dependencies installed:
npm i
npm run start -- --input <path to Tzo VMState .json or Tzo conciseText .txt file> --output out.json
to output a GraphViz .dot file for the Syntax Tree, use the --dot <PATH>
parameter.
To run the unit tests: npm test
(blue: function/opcode, black: literal, purple: block, green: root)
"Hello" "," " world" rconcat rconcat
1 1 + 2 eq dup jgz {
"1 + 1 = 2!" pop
} jz {
"1 + 1 is not 2!?"
}