parseman 0.61.7 → 0.61.8

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/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.61.7";
16
+ export declare const PARSEMAN_VERSION = "0.61.8";
17
17
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parseman",
3
- "version": "0.61.7",
3
+ "version": "0.61.8",
4
4
  "packageManager": "pnpm@10.15.1",
5
5
  "engines": {
6
6
  "node": "^20.19.0 || >=22.13.0"
@@ -120,11 +120,15 @@ export function failCleanAnalysis(code: ArrayLike<number>): FailClean {
120
120
  case OP_CONT:
121
121
  out = clean(code[ip + 1]!) && neverFails(code[ip + 3]!)
122
122
  break
123
- // An arm's failure and the fallback's are committed; only the selector's is
124
- // not, and without a fallback an unknown key fails after the selector wrote.
125
- case OP_DISPATCH:
126
- out = code[ip + 3]! >= 0 && clean(code[ip + 1]!)
123
+ // An arm's failure and a committing fallback's are committed; only the
124
+ // selector's is not. An uncommitted fallback's failure leaves the selector's
125
+ // capture, unless the fallback reads it through `routed()`, which rolls that
126
+ // capture back first. With no fallback, the dispatch fails after the selector wrote.
127
+ case OP_DISPATCH: {
128
+ const flags = code[ip + 4]!
129
+ out = code[ip + 3]! >= 0 && ((flags & 2) === 0 || (flags & 1) === 1) && clean(code[ip + 1]!)
127
130
  break
131
+ }
128
132
  default: {
129
133
  const c = passChild(code, ip)
130
134
  out = c >= 0 && clean(c)
package/src/version.ts CHANGED
@@ -13,4 +13,4 @@
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 const PARSEMAN_VERSION = '0.61.7'
16
+ export const PARSEMAN_VERSION = '0.61.8'