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/version.d.ts
CHANGED
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
* Kept in sync with `package.json` by `test/unit/version-sync.test.ts`, which fails
|
|
14
14
|
* the build if this constant drifts from the published version.
|
|
15
15
|
*/
|
|
16
|
-
export declare const PARSEMAN_VERSION = "0.55.
|
|
16
|
+
export declare const PARSEMAN_VERSION = "0.55.3";
|
|
17
17
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -128,8 +128,7 @@ export function choice<T extends [Combinator<unknown> | GatedArm<unknown>, ...(C
|
|
|
128
128
|
// could have started here" the in-bounds miss below gives. Falling through to
|
|
129
129
|
// firstMatch instead made this position the ONE place a gated-off arm was
|
|
130
130
|
// dropped from the report — firstMatch `continue`s past it and contributes
|
|
131
|
-
// nothing — while the in-bounds miss
|
|
132
|
-
// DOES name it. Same gate state, same "no arm can match", two different
|
|
131
|
+
// nothing — while the in-bounds miss names every arm, gates ignored. Same gate state, same "no arm can match", two different
|
|
133
132
|
// answers; codegen and both table drivers only ever gave the union. Accept and
|
|
134
133
|
// reject are untouched: every arm fails at EOF on either path.
|
|
135
134
|
if (disjoint) {
|
|
@@ -154,14 +153,13 @@ export function choice<T extends [Combinator<unknown> | GatedArm<unknown>, ...(C
|
|
|
154
153
|
if (result.committed) return { ok: false, expected, span: { start: pos, end: pos }, committed: true }
|
|
155
154
|
return { ok: false, expected, span: { start: pos, end: pos } }
|
|
156
155
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
156
|
+
// No arm's first set holds this character (or the input has ended), so
|
|
157
|
+
// every arm fails here without reading it. The report is the arms' static
|
|
158
|
+
// expectations: the set this choice's scalar path and both table drivers
|
|
159
|
+
// report for the same miss. A completion probe or recovery sink still sees
|
|
160
|
+
// each arm fail, as it does behind node/attempt/repeat's first-set guards.
|
|
161
|
+
if (ctx._probe !== undefined || ctx._tolerant) for (const p of parsers) p.parse(input, pos, ctx)
|
|
162
|
+
return { ok: false, expected: [...scalarExpected], span: { start: pos, end: pos } }
|
|
165
163
|
}
|
|
166
164
|
|
|
167
165
|
// ── greedyClassify: run one regex, classify by string equality ─────────
|
package/src/version.ts
CHANGED