@parcel/codeframe 2.8.1 → 2.8.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/lib/codeframe.js CHANGED
@@ -34555,9 +34555,9 @@ const $03b62e45aee69014$var$NO_MATCH = Symbol("nomatch");
34555
34555
  if (match.type === "begin") return doBeginMatch(match);
34556
34556
  else if (match.type === "illegal" && !ignoreIllegals) {
34557
34557
  // illegal match, we do not continue processing
34558
- /** @type {AnnotatedError} */ const err1 = new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top.className || "<unnamed>") + '"');
34559
- err1.mode = top;
34560
- throw err1;
34558
+ /** @type {AnnotatedError} */ const err = new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top.className || "<unnamed>") + '"');
34559
+ err.mode = top;
34560
+ throw err;
34561
34561
  } else if (match.type === "end") {
34562
34562
  const processed = doEndMatch(match);
34563
34563
  if (processed !== $03b62e45aee69014$var$NO_MATCH) return processed;
@@ -34572,8 +34572,8 @@ const $03b62e45aee69014$var$NO_MATCH = Symbol("nomatch");
34572
34572
  // parsing) still 3x behind our index then something is very wrong
34573
34573
  // so we bail
34574
34574
  if (iterations > 100000 && iterations > match.index * 3) {
34575
- const err2 = new Error("potential infinite loop, way more iterations than matches");
34576
- throw err2;
34575
+ const err = new Error("potential infinite loop, way more iterations than matches");
34576
+ throw err;
34577
34577
  }
34578
34578
  /*
34579
34579
  Why might be find ourselves here? Only one occasion now. An end match that was
@@ -35928,12 +35928,12 @@ const $796233c1fee0ccb8$var$highlightSyntax = (txt, lang)=>{
35928
35928
  };
35929
35929
  function $796233c1fee0ccb8$export$2e2bcd8739ae039(code, highlights, inputOpts = {}) {
35930
35930
  if (highlights.length < 1) return "";
35931
- var _maxLines;
35931
+ var _inputOpts_maxLines;
35932
35932
  let opts = {
35933
35933
  useColor: !!inputOpts.useColor,
35934
35934
  syntaxHighlighting: !!inputOpts.syntaxHighlighting,
35935
35935
  language: inputOpts.language,
35936
- maxLines: (_maxLines = inputOpts.maxLines) !== null && _maxLines !== void 0 ? _maxLines : 12,
35936
+ maxLines: (_inputOpts_maxLines = inputOpts.maxLines) !== null && _inputOpts_maxLines !== void 0 ? _inputOpts_maxLines : 12,
35937
35937
  terminalWidth: inputOpts.terminalWidth || $796233c1fee0ccb8$var$DEFAULT_TERMINAL_WIDTH,
35938
35938
  padding: inputOpts.padding || {
35939
35939
  before: 1,