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.esm.js
CHANGED
|
@@ -2762,6 +2762,7 @@ class Expression {
|
|
|
2762
2762
|
this._id = `expression-${indexId$1++}`;
|
|
2763
2763
|
this._type = "expression";
|
|
2764
2764
|
this._name = name;
|
|
2765
|
+
this._originalName = name;
|
|
2765
2766
|
this._parent = null;
|
|
2766
2767
|
this._firstIndex = 0;
|
|
2767
2768
|
this._atomPatterns = [];
|
|
@@ -2894,7 +2895,7 @@ class Expression {
|
|
|
2894
2895
|
if (pattern == null) {
|
|
2895
2896
|
return false;
|
|
2896
2897
|
}
|
|
2897
|
-
return pattern.name === this.
|
|
2898
|
+
return pattern.name === this._originalName;
|
|
2898
2899
|
}
|
|
2899
2900
|
build() {
|
|
2900
2901
|
if (!this._hasOrganized) {
|
|
@@ -3126,6 +3127,7 @@ class Expression {
|
|
|
3126
3127
|
}
|
|
3127
3128
|
clone(name = this._name) {
|
|
3128
3129
|
const clone = new Expression(name, this._originalPatterns);
|
|
3130
|
+
clone._originalName = this.name;
|
|
3129
3131
|
clone._id = this._id;
|
|
3130
3132
|
return clone;
|
|
3131
3133
|
}
|