UNPKG

huncwot

Version:

A Programming Environment for TypeScript apps built on top of VS Code

13 lines (10 loc) 252 B
const nearley = require('nearley'); const grammar = require('./interface.js'); const parser = input => { const p = new nearley.Parser(nearley.Grammar.fromCompiled(grammar)); p.feed(input); return p.results[0]; }; module.exports = { parser };