expressionjs-grammar
v0.1.0
Published
Start to a JavaScript parsing expression grammar.
Downloads
5
Readme
JavaScript PEG
Start to a JavaScript parsing expression grammar.
Installation
node.js:
$ npm install expressionjs-grammar
browser:
$ component install expressionjs/grammar
Example
var Parser = require('grammarjs-recursive-parser');
var js = require('expressionjs-grammar');
var parser = new Parser(js);
var ast = parser.parse('isLoggedIn ? "Logged in" : "Log in"');
Overview
The general hierarchy for the grammar is this:
- interpolated-object
- interpolation
- iterator
- object
- assignment
- ternary
- binary
- unary
- call
- member
- identifier
- literal
Licence
MIT