parseman 0.40.0 → 0.41.0

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.
@@ -320,9 +320,11 @@ function markUnusedValues(root) {
320
320
  visit(def.parser, consumed);
321
321
  visit(def.sentinel, false);
322
322
  return;
323
+ case "token":
324
+ visit(def.parser, false);
325
+ return;
323
326
  case "label":
324
327
  case "trivia":
325
- case "token":
326
328
  case "attempt":
327
329
  case "withCtx":
328
330
  case "expect":
@@ -2222,7 +2224,7 @@ var META = new Set("()[]{}*+?|^$.".split(""));
2222
2224
  var CAP_RECORD = [
2223
2225
  ` if (_cap && _e > _pos) {`,
2224
2226
  ` if (_ctx._triviaLog !== undefined) _ctx._triviaLog.push(_pos, _e)`,
2225
- ` if (_ctx._cstTriviaLog !== undefined && _ctx.captureTrivia) _ctx._cstTriviaLog.push(_pos, _e, _ctx._cstRawChildren ? _ctx._cstRawChildren.length : 0)`,
2227
+ ` if (_cap === 1 && _ctx._cstTriviaLog !== undefined && _ctx.captureTrivia) _ctx._cstTriviaLog.push(_pos, _e, _ctx._cstRawChildren ? _ctx._cstRawChildren.length : 0)`,
2226
2228
  ` }`
2227
2229
  ].join("\n");
2228
2230