(originally on Google Code)
TinyJS is not designed to be fast or full-featured. However it is great for scripting simple behaviour, or loading & saving settings.
Currently TinyJS supports:
- Variables, Arrays, Structures
- JSON parsing and output
- Objects with Inheritance (not fully implemented)
Please see CodeExamples for examples of code that works...
For a list of known issues, please see the comments at the top of the TinyJS.cpp file, as well as the GitHub issues
TinyJS is released under an MIT licence.
TinyJS uses a Recursive Descent Parser, so there is no 'Parser Generator' required. It does not compile to an intermediate code, and instead executes directly from source code. This makes it quite fast for code that is executed infrequently, and slow for loops.
Variables, Arrays and Objects are stored in a simple linked list tree structure (42tiny-js uses a C++ Map). This is simple, but relatively slow for large structures or arrays.