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/package.json
CHANGED
|
@@ -273,13 +273,13 @@ export class ExpressionPattern implements Pattern {
|
|
|
273
273
|
const node = pattern.parse(cursor);
|
|
274
274
|
|
|
275
275
|
if (node != null) {
|
|
276
|
-
if (lastBinaryNode != null && lastUnaryNode != null) {
|
|
277
|
-
lastBinaryNode.appendChild(lastUnaryNode);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
276
|
const name = this._recursiveNames[i];
|
|
281
277
|
|
|
282
278
|
if (this._endsInRecursion[i]) {
|
|
279
|
+
if (lastBinaryNode != null && lastUnaryNode != null) {
|
|
280
|
+
lastBinaryNode.appendChild(lastUnaryNode);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
283
|
const frontExpression = lastBinaryNode == null ? lastUnaryNode as Node : lastBinaryNode.findRoot();
|
|
284
284
|
const recursiveNode = createNode(name, [frontExpression, ...node.children]);
|
|
285
285
|
|
|
@@ -293,6 +293,11 @@ export class ExpressionPattern implements Pattern {
|
|
|
293
293
|
|
|
294
294
|
if (cursor.hasNext()) {
|
|
295
295
|
cursor.next();
|
|
296
|
+
} else {
|
|
297
|
+
if (lastBinaryNode != null) {
|
|
298
|
+
lastBinaryNode.appendChild(lastUnaryNode);
|
|
299
|
+
}
|
|
300
|
+
break outer;
|
|
296
301
|
}
|
|
297
302
|
break;
|
|
298
303
|
}
|