fix opts of internal parsing

This commit is contained in:
marihachi 2022-01-09 22:55:55 +09:00
parent f1d942be62
commit b3efd45f2a

View file

@ -32,7 +32,11 @@
function applyParser(input, startRule, opts) {
const parseFunc = peg$parse;
const parseOpts = { ...(opts || {}) };
const parseOpts = {
fnNameList: options.fnNameList,
nestLimit: (nestLimit - depth),
...(opts || {}),
};
if (startRule) parseOpts.startRule = startRule;
return parseFunc(input, parseOpts);
}