clarity-pattern-parser 11.1.1 → 11.1.2
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 +3 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.esm.js +3 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/patterns/Expression.d.ts +1 -0
- package/package.json +1 -1
- package/src/patterns/Expression.test.ts +8 -0
- package/src/patterns/Expression.ts +4 -1
package/dist/index.js
CHANGED
|
@@ -2766,6 +2766,7 @@ class Expression {
|
|
|
2766
2766
|
this._id = `expression-${indexId$1++}`;
|
|
2767
2767
|
this._type = "expression";
|
|
2768
2768
|
this._name = name;
|
|
2769
|
+
this._originalName = name;
|
|
2769
2770
|
this._parent = null;
|
|
2770
2771
|
this._firstIndex = 0;
|
|
2771
2772
|
this._atomPatterns = [];
|
|
@@ -2898,7 +2899,7 @@ class Expression {
|
|
|
2898
2899
|
if (pattern == null) {
|
|
2899
2900
|
return false;
|
|
2900
2901
|
}
|
|
2901
|
-
return pattern.name === this.
|
|
2902
|
+
return pattern.name === this._originalName;
|
|
2902
2903
|
}
|
|
2903
2904
|
build() {
|
|
2904
2905
|
if (!this._hasOrganized) {
|
|
@@ -3130,6 +3131,7 @@ class Expression {
|
|
|
3130
3131
|
}
|
|
3131
3132
|
clone(name = this._name) {
|
|
3132
3133
|
const clone = new Expression(name, this._originalPatterns);
|
|
3134
|
+
clone._originalName = this.name;
|
|
3133
3135
|
clone._id = this._id;
|
|
3134
3136
|
return clone;
|
|
3135
3137
|
}
|