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
package/dist/table/index.js
CHANGED
|
@@ -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
|
-
|
|
2804
|
-
|
|
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);
|