clarity-pattern-parser 10.3.6 → 10.3.7
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
|
@@ -2960,6 +2960,7 @@ class ExpressionPattern {
|
|
|
2960
2960
|
this._firstIndex = cursor.index;
|
|
2961
2961
|
const node = this._tryToParse(cursor);
|
|
2962
2962
|
if (node != null) {
|
|
2963
|
+
node.normalize(this._firstIndex);
|
|
2963
2964
|
cursor.moveTo(node.lastIndex);
|
|
2964
2965
|
cursor.resolveError();
|
|
2965
2966
|
this._compactResult(node);
|
|
@@ -3066,7 +3067,6 @@ class ExpressionPattern {
|
|
|
3066
3067
|
}
|
|
3067
3068
|
const frontExpression = lastBinaryNode == null ? lastAtomNode : lastBinaryNode.findRoot();
|
|
3068
3069
|
const recursiveNode = createNode(name, [frontExpression, ...node.children]);
|
|
3069
|
-
recursiveNode.normalize(this._firstIndex);
|
|
3070
3070
|
return recursiveNode;
|
|
3071
3071
|
}
|
|
3072
3072
|
else {
|
|
@@ -3074,7 +3074,6 @@ class ExpressionPattern {
|
|
|
3074
3074
|
lastAtomNode = createNode(prefixName, [prefix, lastAtomNode]);
|
|
3075
3075
|
}
|
|
3076
3076
|
const recursiveNode = createNode(name, [lastAtomNode, ...node.children]);
|
|
3077
|
-
recursiveNode.normalize(lastAtomNode.startIndex);
|
|
3078
3077
|
lastAtomNode = recursiveNode;
|
|
3079
3078
|
if (cursor.hasNext()) {
|
|
3080
3079
|
cursor.next();
|
|
@@ -3183,7 +3182,6 @@ class ExpressionPattern {
|
|
|
3183
3182
|
return lastAtomNode;
|
|
3184
3183
|
}
|
|
3185
3184
|
}
|
|
3186
|
-
root.normalize(this._firstIndex);
|
|
3187
3185
|
return root;
|
|
3188
3186
|
}
|
|
3189
3187
|
}
|