Ohm grammars for various editions of ECMAScript (aka JavaScript).
npm install ohm-grammar-ecmascriptThis directory contains Ohm grammars for various versions of the ECMAScript
spec. Currently, only the ES5 grammar is reasonably complete, but we are
working on ES6.
You can install these grammars as an NPM package:
```
npm install ohm-grammar-ecmascript
After installing, you can use the ES5 grammar like this:
`js``
import * as es5 from 'ohm-grammar-ecmascript';
const result = es5.grammar.match('var x = 3; console.log(x);');
assert(result.succeeded());
- BREAKING CHANGE: Switch to an ESM-only package.
- Make sure index.js is included in the published package.