parseman 0.55.2 → 0.55.3

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.
@@ -2800,14 +2800,8 @@ function choice(...args) {
2800
2800
  if (result.committed) return { ok: false, expected, span: { start: pos, end: pos }, committed: true };
2801
2801
  return { ok: false, expected, span: { start: pos, end: pos } };
2802
2802
  }
2803
- return {
2804
- ok: false,
2805
- expected: parsers.flatMap((p) => {
2806
- const r = p.parse(input, pos, ctx);
2807
- return r.ok ? [] : r.expected;
2808
- }),
2809
- span: { start: pos, end: pos }
2810
- };
2803
+ if (ctx._probe !== void 0 || ctx._tolerant) for (const p of parsers) p.parse(input, pos, ctx);
2804
+ return { ok: false, expected: [...scalarExpected], span: { start: pos, end: pos } };
2811
2805
  }
2812
2806
  if (strategy?.tag === "greedyClassify") {
2813
2807
  const superResult = parsers[strategy.superIndex].parse(input, pos, ctx);