Lines 3988-4028javascript
3988 capturing: hasNodeDef(combinator),
3989 lazyUsage: analyzeLazyUsage(combinator)
3991 const r = emit(combinator, ctx, "_pos");
3992 const collatorDecl = ctx.needsCollator ? `const _collator = new Intl.Collator(undefined, { sensitivity: 'accent' })
3994 const namedPrelude = ctx.namedFnDecls.length > 0 ? [...namedFnPrelude(), ""] : [];
3995 const emptyTlDecls = ctx.needsEmptyTl ? ["const _EMPTY_TL = Object.freeze([])"] : [];
3999 ...ctx.expectedDecls,
4002 ctx.namedFnDecls.join("\n\n"),
4003 `${collatorDecl}function _parse(input, _pos, _rp, _mf, _build, _ctx) {`,
4006 ` return { ok: true, value: ${r.valueVar}, span: { start: _pos, end: ${r.endVar} } }`,
4009 const fn = new Function("input", "_pos", "_rp", "_mf", "_build", "_ctx", [
4010 ...emptyTlDecls,
LowEval
Package source references a known benign dynamic code generation pattern.
dist/plugin/index.jsView on unpkg · L4008 4012 ...ctx.expectedDecls,
4015 ...ctx.namedFnDecls.flatMap((decl, i) => i > 0 ? ["", decl] : [decl]),
4018 `return { ok: true, value: ${r.valueVar}, span: { start: _pos, end: ${r.endVar} } }`
4020 const defaultCtx = {
4022 ...ctx.triviaKindLabels ? { triviaKindLabels: ctx.triviaKindLabels } : {}
4024 const derivedSrcs = ctx.mapFnSrcs.length === ctx.mapFns.length && ctx.mapFnSrcs.every((s) => s !== null) ? ctx.mapFnSrcs : void 0;
4025 const effectiveSources = mapFnSources ?? derivedSrcs;
4026 const buildCovered = ctx.buildFns.length === 0 || ctx.buildSrcs.every((s) => s !== null);
4027 const buildSources = ctx.buildFns.length === 0 ? void 0 : ctx.buildSrcs;
4028 const mfCovered = ctx.mapFns.length === 0 || effectiveSources !== void 0 && effectiveSources.length === ctx.mapFns.length;