You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Peggy.js just released a breaking release which amongst other things changes how allowedStartRules are defined peggyjs/peggy#175
As a result, running node src/generate-parser.js with the ts-pegjs plugin now causes the error below to occur
/path-to-project/node_modules/ts-pegjs/src/passes/generate-ts.js:1076
options.allowedStartRules.map(
^
TypeError: Cannot read properties of undefined (reading 'map')
at generateToplevel (/path-to-project/node_modules/ts-pegjs/src/passes/generate-ts.js:1076:35)
at generateTS (/path-to-project/node_modules/ts-pegjs/src/passes/generate-ts.js:1562:30)
at /node_modules/peggy/lib/compiler/index.js:99:9
at Array.forEach (<anonymous>)
at /node_modules/peggy/lib/compiler/index.js:96:21
at Array.forEach (<anonymous>)
at Object.compile (/node_modules/peggy/lib/compiler/index.js:92:25)
at Object.generate /node_modules/peggy/lib/peg.js:112:25)
at /expression-parser/src/generate-parser.js:7:22
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
minimal reproducible config
// generate-parser.js
var fs = require('fs');
var peggy = require('peggy');
var tspegjs = require('ts-pegjs');
fs.readFile('examples/arithmetics.pegjs', function (err, data) {
if (err) throw err;
var parser = peggy.generate(data.toString(), {
output: 'source',
cache: true,
plugins: [tspegjs],
tspegjs: {
customHeader: '// @ts-nocheck',
},
});
fs.writeFileSync('examples/arithmetics.ts', parser);
});
The text was updated successfully, but these errors were encountered:
Peggy.js just released a breaking release which amongst other things changes how allowedStartRules are defined peggyjs/peggy#175
As a result, running
node src/generate-parser.js
with the ts-pegjs plugin now causes the error below to occurminimal reproducible config
The text was updated successfully, but these errors were encountered: