clarity-pattern-parser 11.1.2 → 11.1.4

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.esm.js CHANGED
@@ -3127,7 +3127,7 @@ class Expression {
3127
3127
  }
3128
3128
  clone(name = this._name) {
3129
3129
  const clone = new Expression(name, this._originalPatterns);
3130
- clone._originalName = this.name;
3130
+ clone._originalName = this._originalName;
3131
3131
  clone._id = this._id;
3132
3132
  return clone;
3133
3133
  }
@@ -3230,7 +3230,7 @@ function generateErrorMessage(pattern, cursor) {
3230
3230
  return `Error at line 1, column 1. Hint: ${suggestions}`;
3231
3231
  }
3232
3232
  const lastPattern = furthestMatch.pattern;
3233
- const suggestions = cleanSuggestions(lastPattern.getTokens());
3233
+ const suggestions = cleanSuggestions(lastPattern.getNextTokens());
3234
3234
  const strUpToError = cursor.getChars(0, endIndex);
3235
3235
  const lines = strUpToError.split("\n");
3236
3236
  const lastLine = lines[lines.length - 1];