A simple single-file javascript interpreter written in C++
This project aims to be an extremely simple (~2000 lines currently) JavaScript interpreter, meant for inclusion in applications that require a simple, familiar script language that can be included with no dependencies other than normal C++ libraries. It currently consists of two source files - one containing the interpreter, another containing built-in functions such as String.substring.I make absolutely no guarantees that this is compliant to JavaScript/EcmaScript standard. In fact I am sure it isn't. However I welcome suggestions for changes that will bring it closer to compliancy without overly complicating the code, or useful test cases to add to the test suite.
Currently TinyJS supports:
- Variables, Arrays, Structures
- JSON parsing and output
- Functions
- Calling C/C++ code from JavaScript
- Objects with Inheritance (not fully implemented)
TinyJS is released under an LGPL licence.
It is available on Google Code at the following address:
http://code.google.com/p/tiny-js/