parseman 0.58.0 → 0.58.1

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/index.js CHANGED
@@ -8450,12 +8450,13 @@ var Encoder = class {
8450
8450
  const rr = this.refResolver();
8451
8451
  const { next, boundary } = follow;
8452
8452
  if (matchesEmpty(next, /* @__PURE__ */ new Set(), rr) || mayCommitFailure(next, rr, this.commitFailureMemo)) return void 0;
8453
- const nextTag = next._def.tag;
8454
- if (nextTag !== "literal" && nextTag !== "regex" && nextTag !== "keywords" && nextTag !== "label") return void 0;
8453
+ const nextDef = next._def;
8454
+ if (nextDef.tag !== "literal" && nextDef.tag !== "regex" && nextDef.tag !== "keywords" && nextDef.tag !== "label") return void 0;
8455
8455
  const first = firstSetOf(next, /* @__PURE__ */ new Set(), rr, boundary);
8456
8456
  const cls = this.charClass(boundary === void 0 ? first : union(first, firstSetOf(boundary, /* @__PURE__ */ new Set(), rr)));
8457
8457
  if (cls < 0) return void 0;
8458
- return { cls, fx: this.expected(deriveExpected(next)) };
8458
+ const miss = nextDef.tag === "label" ? deriveExpected(next) : directTerminalFailureExpected(nextDef);
8459
+ return { cls, fx: this.expected(miss) };
8459
8460
  }
8460
8461
  node(p) {
8461
8462
  const lazyRef = p._def.tag === "lazy";
@@ -19247,7 +19248,7 @@ function fieldOptionsSrc(def) {
19247
19248
  }
19248
19249
 
19249
19250
  // src/version.ts
19250
- var PARSEMAN_VERSION = "0.58.0";
19251
+ var PARSEMAN_VERSION = "0.58.1";
19251
19252
 
19252
19253
  // src/compiler/compile-linkable-table.ts
19253
19254
  function isLocal(rule) {