@peer_iq/broccoli-pegjs
v1.0.0
Published
PEG.js filter for Broccoli
Downloads
3
Readme
broccoli-pegjs
A PEG.js filter for Broccoli.
Installation
npm install --save-dev broccoli-pegjs
Usage
var peg = require('broccoli-pegjs');
tree = peg(tree, options);
Options
Custom Wrapper
It is possible to wrap the generated parser in any code you want:
tree = peg(tree, {
wrapper: function (src, parser) {
return 'var Parser = ' + parser + ";\nvar parse = Parser.parse, SyntaxError = Parser.SyntaxError;\nexport {SyntaxError, parse};\nexport default parse;";
}
});