esschema
v0.0.3
Published
Esprima compatible AST description through JSON Schema
Downloads
9
Readme
esschema
Attempts to describe the Mozilla Parser AST compatible Esprima AST via a JSON Schema.
While the primary purpose of Esschema is to describe the AST, the esschema.json file can be used with JSON Schema validation libraries to validate an AST.
Esschema is created and maintained by Dusty Little.
Rational
Why use a JSON Schema to validate Esprima AST when there are other more performant libraries like Esvalidate. While Esschema can be used to validate the AST the primary purpose is to describe the AST in a format that can be read by other tools (stay tuned to scratch.js for an example)
Run Tests
Esschema includes a large number of tests most of which are adapted from the Mozilla Parser AST test suite itself. Execute these tests using mocha:
`mocha -R spec