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.
@@ -14756,7 +14756,8 @@ function tableRules(source, metadataOrEntry = {}) {
14756
14756
  scanSkipFor: (ri, ctx) => {
14757
14757
  const a = cache.forCtx(ctx);
14758
14758
  selected = a;
14759
- return a.scanSkip[skipOf?.[ri] ?? -1];
14759
+ const slot = skipOf?.[ri];
14760
+ return slot === void 0 || slot < 0 ? void 0 : a.scanSkip[slot];
14760
14761
  }
14761
14762
  }, artifactMetadata, resolved);
14762
14763
  if (entry === void 0) return map;
@@ -16706,8 +16707,11 @@ function compileImpl(combinator, mapFnSources, opts = {}) {
16706
16707
  // falls back to regex-scanning generated hooks; a table has no hooks to scan,
16707
16708
  // so this is the channel.
16708
16709
  ...plan === void 0 ? {} : { coverageDefinitions: plan.definitions },
16709
- parse(input, pos = 0) {
16710
- return runOnce(input, pos, createParseContext());
16710
+ // The same three arguments as a combinator's own `parse`, so a compiled
16711
+ // parser runs where a combinator does. A caller probing many positions
16712
+ // passes one context and pays for none per call.
16713
+ parse(input, pos = 0, ctx) {
16714
+ return runOnce(input, pos, ctx ?? createParseContext());
16711
16715
  },
16712
16716
  parseWithContext(input, parseCtx, pos = 0) {
16713
16717
  return runOnce(input, pos, parseCtx);