clarity-pattern-parser 10.2.7 → 10.2.9
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
|
@@ -2892,11 +2892,11 @@ class ExpressionPattern {
|
|
|
2892
2892
|
const pattern = this._recursivePatterns[i];
|
|
2893
2893
|
const node = pattern.parse(cursor);
|
|
2894
2894
|
if (node != null) {
|
|
2895
|
-
if (lastBinaryNode != null && lastUnaryNode != null) {
|
|
2896
|
-
lastBinaryNode.appendChild(lastUnaryNode);
|
|
2897
|
-
}
|
|
2898
2895
|
const name = this._recursiveNames[i];
|
|
2899
2896
|
if (this._endsInRecursion[i]) {
|
|
2897
|
+
if (lastBinaryNode != null && lastUnaryNode != null) {
|
|
2898
|
+
lastBinaryNode.appendChild(lastUnaryNode);
|
|
2899
|
+
}
|
|
2900
2900
|
const frontExpression = lastBinaryNode == null ? lastUnaryNode : lastBinaryNode.findRoot();
|
|
2901
2901
|
const recursiveNode = createNode(name, [frontExpression, ...node.children]);
|
|
2902
2902
|
recursiveNode.normalize(this._firstIndex);
|
|
@@ -2909,6 +2909,12 @@ class ExpressionPattern {
|
|
|
2909
2909
|
if (cursor.hasNext()) {
|
|
2910
2910
|
cursor.next();
|
|
2911
2911
|
}
|
|
2912
|
+
else {
|
|
2913
|
+
if (lastBinaryNode != null) {
|
|
2914
|
+
lastBinaryNode.appendChild(lastUnaryNode);
|
|
2915
|
+
}
|
|
2916
|
+
break outer;
|
|
2917
|
+
}
|
|
2912
2918
|
break;
|
|
2913
2919
|
}
|
|
2914
2920
|
}
|