-
Davis Silverman authored
Hi there, `Peg.js` is unmaintained, so I figure you all would appreciate if I replaced it with the drop-in replacement of Peggy. This is work I am breaking out of #918. Peggy adds new features like source map support that we could use, although I do not include that in this change-set. It may be useful for debugging changes to the .pegjs file we have.e
Davis Silverman authoredHi there, `Peg.js` is unmaintained, so I figure you all would appreciate if I replaced it with the drop-in replacement of Peggy. This is work I am breaking out of #918. Peggy adds new features like source map support that we could use, although I do not include that in this change-set. It may be useful for debugging changes to the .pegjs file we have.e
peg-loader.js 305 B
// webpack loader for .pegjs files using Peggy.
const peg = require('peggy');
module.exports = function loadPeg(source) {
// TODO: a second value can be returned. A JS SourceMap object.
// Peggy can output such an object.
return peg.generate(source, { output: 'source', format: 'umd' });
};