parseman 0.55.3 → 0.55.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../src/table/exec.ts"],"names":[],"mappings":"AA6CA,OAAO,EAEL,KAAK,cAAc,EACF,KAAK,YAAY,EAAE,KAAK,SAAS,EACnD,MAAM,cAAc,CAAA;AA4BrB;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,EAAE;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,UAAU,CAAA;IAChB,+EAA+E;IAC/E,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAA;IAChC;;;;;;;;;;;OAWG;IACH,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;IACpB,sFAAsF;IACtF,eAAe,EAAE,MAAM,CAAA;IACvB,YAAY,EAAE,MAAM,CAAA;IACpB,qFAAqF;IACrF,YAAY,EAAE,MAAM,CAAA;CAC+H,CAAA;AAUrJ,wBAAgB,kBAAkB,IAAI,IAAI,CASzC;AAwlDD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,YAAY,GAAG,cAAc;AACrC;;;;;;;;GAQG;AACH,IAAI,GAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,EACjC,gBAAgB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM,GACvD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CA8B3B"}
1
+ {"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../src/table/exec.ts"],"names":[],"mappings":"AA6CA,OAAO,EAEL,KAAK,cAAc,EACF,KAAK,YAAY,EAAE,KAAK,SAAS,EACnD,MAAM,cAAc,CAAA;AA4BrB;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,EAAE;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,UAAU,CAAA;IAChB,+EAA+E;IAC/E,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAA;IAChC;;;;;;;;;;;OAWG;IACH,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;IACpB,sFAAsF;IACtF,eAAe,EAAE,MAAM,CAAA;IACvB,YAAY,EAAE,MAAM,CAAA;IACpB,qFAAqF;IACrF,YAAY,EAAE,MAAM,CAAA;CAC+H,CAAA;AAUrJ,wBAAgB,kBAAkB,IAAI,IAAI,CASzC;AAwlDD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,YAAY,GAAG,cAAc;AACrC;;;;;;;;GAQG;AACH,IAAI,GAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,EACjC,gBAAgB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM,GACvD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAiC3B"}
@@ -11586,7 +11586,8 @@ function tableRules(source, metadataOrEntry = {}) {
11586
11586
  scanSkipFor: (ri, ctx) => {
11587
11587
  const a = cache.forCtx(ctx);
11588
11588
  selected = a;
11589
- return a.scanSkip[skipOf?.[ri] ?? -1];
11589
+ const slot = skipOf?.[ri];
11590
+ return slot === void 0 || slot < 0 ? void 0 : a.scanSkip[slot];
11590
11591
  }
11591
11592
  }, artifactMetadata, resolved);
11592
11593
  if (entry === void 0) return map;
@@ -15739,8 +15740,11 @@ function compileImpl(combinator, mapFnSources, opts = {}) {
15739
15740
  // falls back to regex-scanning generated hooks; a table has no hooks to scan,
15740
15741
  // so this is the channel.
15741
15742
  ...plan === void 0 ? {} : { coverageDefinitions: plan.definitions },
15742
- parse(input, pos = 0) {
15743
- return runOnce(input, pos, createParseContext());
15743
+ // The same three arguments as a combinator's own `parse`, so a compiled
15744
+ // parser runs where a combinator does. A caller probing many positions
15745
+ // passes one context and pays for none per call.
15746
+ parse(input, pos = 0, ctx) {
15747
+ return runOnce(input, pos, ctx ?? createParseContext());
15744
15748
  },
15745
15749
  parseWithContext(input, parseCtx, pos = 0) {
15746
15750
  return runOnce(input, pos, parseCtx);