Skip to content

Compilation

Socratic_Phoenix edited this page Aug 19, 2017 · 8 revisions

<-- Back | Next -->


Shnap is an interpreted language, which means that:

  1. First, the code is parsed into an Abstract Syntax Tree
  2. Second, the code is executed

That first step can significantly slow down any language, so Shnap offers a 'compiled' format, which is basically just an encoding of the abstract syntax tree. This compiled format is faster to load, so it can increase performance. The interpreter has a flag for compiling. A compiled Shnap script uses the extension cshnap, while a Shnap archive has the extension sar (see file extensions).

The cshnap (compiled shnap) format:

//TODO: fill out

Clone this wiki locally