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/analysis/diagnostics.js +2 -8
- package/dist/analysis/diagnostics.js.map +1 -1
- package/dist/cli/index.js +2 -8
- package/dist/cli/index.js.map +1 -1
- package/dist/combinators/choice.d.ts.map +1 -1
- package/dist/index.js +3 -9
- package/dist/index.js.map +1 -1
- package/dist/plugin/index.js +3 -9
- package/dist/plugin/index.js.map +1 -1
- package/dist/table/index.js +2 -8
- package/dist/table/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/combinators/choice.ts +8 -10
- package/src/version.ts +1 -1
|
@@ -3646,14 +3646,8 @@ function choice(...args) {
|
|
|
3646
3646
|
if (result.committed) return { ok: false, expected, span: { start: pos, end: pos }, committed: true };
|
|
3647
3647
|
return { ok: false, expected, span: { start: pos, end: pos } };
|
|
3648
3648
|
}
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
expected: parsers.flatMap((p) => {
|
|
3652
|
-
const r = p.parse(input, pos, ctx);
|
|
3653
|
-
return r.ok ? [] : r.expected;
|
|
3654
|
-
}),
|
|
3655
|
-
span: { start: pos, end: pos }
|
|
3656
|
-
};
|
|
3649
|
+
if (ctx._probe !== void 0 || ctx._tolerant) for (const p of parsers) p.parse(input, pos, ctx);
|
|
3650
|
+
return { ok: false, expected: [...scalarExpected], span: { start: pos, end: pos } };
|
|
3657
3651
|
}
|
|
3658
3652
|
if (strategy?.tag === "greedyClassify") {
|
|
3659
3653
|
const superResult = parsers[strategy.superIndex].parse(input, pos, ctx);
|