UNPKG

llparse

Version:

[![Build Status](https://secure.travis-ci.org/indutny/llparse.svg)](http://travis-ci.org/indutny/llparse) [![NPM version](https://badge.fury.io/js/llparse.svg)](https://badge.fury.io/js/llparse)

38 lines (28 loc) 633 B
'use strict'; const internal = require('./llparse/'); // API, really class LLParse { constructor(prefix) { this.prefix = prefix || 'llparse'; } static create(prefix) { return new LLParse(prefix); } node(name) { return new internal.node.Node(name); } error(code, reason) { return new internal.node.Error(code, reason); } invoke(name, map, otherwise) { return new internal.node.Invoke(name, map, otherwise); } skip() { return new internal.node.Skip(); } build(root) { const c = new internal.Compiler(this.prefix); return c.build(root); } } module.exports = LLParse;