Parser for simple JavaScript expressions based on PEG.js.
npm install
gulp build
dist/js_expr.js
is the output
The parser builds in nodejs' module
manner. It exports function parse(expr)
which returns an AST.
The AST can be rendered back to JS code, look into src/renderer.js.