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.browser.js +2 -2
- package/dist/index.browser.js.map +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/patterns/Expression.test.ts +2 -2
- package/src/patterns/Expression.ts +1 -1
- package/src/patterns/generate_error_message.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -3131,7 +3131,7 @@ class Expression {
|
|
|
3131
3131
|
}
|
|
3132
3132
|
clone(name = this._name) {
|
|
3133
3133
|
const clone = new Expression(name, this._originalPatterns);
|
|
3134
|
-
clone._originalName = this.
|
|
3134
|
+
clone._originalName = this._originalName;
|
|
3135
3135
|
clone._id = this._id;
|
|
3136
3136
|
return clone;
|
|
3137
3137
|
}
|
|
@@ -3234,7 +3234,7 @@ function generateErrorMessage(pattern, cursor) {
|
|
|
3234
3234
|
return `Error at line 1, column 1. Hint: ${suggestions}`;
|
|
3235
3235
|
}
|
|
3236
3236
|
const lastPattern = furthestMatch.pattern;
|
|
3237
|
-
const suggestions = cleanSuggestions(lastPattern.
|
|
3237
|
+
const suggestions = cleanSuggestions(lastPattern.getNextTokens());
|
|
3238
3238
|
const strUpToError = cursor.getChars(0, endIndex);
|
|
3239
3239
|
const lines = strUpToError.split("\n");
|
|
3240
3240
|
const lastLine = lines[lines.length - 1];
|