JawaScript is a minimized subset of JavaScript. It consists of a Java-based parser and an Android executive engine. (iOS executive is under development.) Its goal is to provide a dynamic scripting environment for mobile APPs with a minimal size overhead. Currently, the size of the Android executive is less than 20K.
The executive engine is a LOW-performance interpreter executing the AST generated by the parser. So, don't use it in time-critical routines.
An adequate description for the syntax of JawaScript is "type-less C." For the size constraint many JavaScript features are excluded from JawaScript:
-
No literal template
-
No unicode support in identifier
-
No complex identifier
-
No spread operator
-
No regular expression
-
No octal string
-
0x2028 and 0x2029 are treated indifferently from ordinary characters
-
No unicode character in string literal
-
Support only {x, u, r, n, t, v} in string escaping
-
No exception handling (try, catch, throw, finally)
-
No yield nor generator
-
No class, super, extends
-
No const
-
No export, import
-
No debugger
-
No comment
-
No switch
-
No this
-
No eval
-
No directive prologues
-
No unnamed functions
-
No ... in parameters
-
No default value in parameters
-
No nested function declaration
-
No labeled statement
-
No anonymous function
-
No arrow function
-
No new.target
Parser : https://github.com/hackjackhack/JawaScriptParser Android executive : https://github.com/hackjackhack/JawaScriptExecutive-Android iOS executive : (under development)
Usage: See test cases.