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.
package/dist/cli/index.js CHANGED
@@ -3919,14 +3919,8 @@ function choice(...args) {
3919
3919
  if (result.committed) return { ok: false, expected, span: { start: pos, end: pos }, committed: true };
3920
3920
  return { ok: false, expected, span: { start: pos, end: pos } };
3921
3921
  }
3922
- return {
3923
- ok: false,
3924
- expected: parsers.flatMap((p) => {
3925
- const r = p.parse(input, pos, ctx);
3926
- return r.ok ? [] : r.expected;
3927
- }),
3928
- span: { start: pos, end: pos }
3929
- };
3922
+ if (ctx._probe !== void 0 || ctx._tolerant) for (const p of parsers) p.parse(input, pos, ctx);
3923
+ return { ok: false, expected: [...scalarExpected], span: { start: pos, end: pos } };
3930
3924
  }
3931
3925
  if (strategy?.tag === "greedyClassify") {
3932
3926
  const superResult = parsers[strategy.superIndex].parse(input, pos, ctx);