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/cli/index.js CHANGED
@@ -5713,7 +5713,7 @@ function regex(pattern, flags = "") {
5713
5713
  }
5714
5714
 
5715
5715
  // src/version.ts
5716
- var PARSEMAN_VERSION = "0.61.7";
5716
+ var PARSEMAN_VERSION = "0.61.8";
5717
5717
 
5718
5718
  // src/table/lex-body.ts
5719
5719
  function buildLexBodyRecognizer(spec, constants) {
@@ -14015,11 +14015,15 @@ function failCleanAnalysis(code) {
14015
14015
  case OP_CONT:
14016
14016
  out = clean(code[ip + 1]) && neverFails(code[ip + 3]);
14017
14017
  break;
14018
- // An arm's failure and the fallback's are committed; only the selector's is
14019
- // not, and without a fallback an unknown key fails after the selector wrote.
14020
- case OP_DISPATCH:
14021
- out = code[ip + 3] >= 0 && clean(code[ip + 1]);
14018
+ // An arm's failure and a committing fallback's are committed; only the
14019
+ // selector's is not. An uncommitted fallback's failure leaves the selector's
14020
+ // capture, unless the fallback reads it through `routed()`, which rolls that
14021
+ // capture back first. With no fallback, the dispatch fails after the selector wrote.
14022
+ case OP_DISPATCH: {
14023
+ const flags = code[ip + 4];
14024
+ out = code[ip + 3] >= 0 && ((flags & 2) === 0 || (flags & 1) === 1) && clean(code[ip + 1]);
14022
14025
  break;
14026
+ }
14023
14027
  default: {
14024
14028
  const c = passChild(code, ip);
14025
14029
  out = c >= 0 && clean(c);