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.js
CHANGED
|
@@ -2964,6 +2964,7 @@ class ExpressionPattern {
|
|
|
2964
2964
|
this._firstIndex = cursor.index;
|
|
2965
2965
|
const node = this._tryToParse(cursor);
|
|
2966
2966
|
if (node != null) {
|
|
2967
|
+
node.normalize(this._firstIndex);
|
|
2967
2968
|
cursor.moveTo(node.lastIndex);
|
|
2968
2969
|
cursor.resolveError();
|
|
2969
2970
|
this._compactResult(node);
|
|
@@ -3070,7 +3071,6 @@ class ExpressionPattern {
|
|
|
3070
3071
|
}
|
|
3071
3072
|
const frontExpression = lastBinaryNode == null ? lastAtomNode : lastBinaryNode.findRoot();
|
|
3072
3073
|
const recursiveNode = createNode(name, [frontExpression, ...node.children]);
|
|
3073
|
-
recursiveNode.normalize(this._firstIndex);
|
|
3074
3074
|
return recursiveNode;
|
|
3075
3075
|
}
|
|
3076
3076
|
else {
|
|
@@ -3078,7 +3078,6 @@ class ExpressionPattern {
|
|
|
3078
3078
|
lastAtomNode = createNode(prefixName, [prefix, lastAtomNode]);
|
|
3079
3079
|
}
|
|
3080
3080
|
const recursiveNode = createNode(name, [lastAtomNode, ...node.children]);
|
|
3081
|
-
recursiveNode.normalize(lastAtomNode.startIndex);
|
|
3082
3081
|
lastAtomNode = recursiveNode;
|
|
3083
3082
|
if (cursor.hasNext()) {
|
|
3084
3083
|
cursor.next();
|
|
@@ -3187,7 +3186,6 @@ class ExpressionPattern {
|
|
|
3187
3186
|
return lastAtomNode;
|
|
3188
3187
|
}
|
|
3189
3188
|
}
|
|
3190
|
-
root.normalize(this._firstIndex);
|
|
3191
3189
|
return root;
|
|
3192
3190
|
}
|
|
3193
3191
|
}
|