clarity-pattern-parser 10.2.6 → 10.2.8

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clarity-pattern-parser",
3
- "version": "10.2.6",
3
+ "version": "10.2.8",
4
4
  "description": "Parsing Library for Typescript and Javascript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.esm.js",
@@ -276,7 +276,7 @@ export class ExpressionPattern implements Pattern {
276
276
  if (lastBinaryNode != null && lastUnaryNode != null) {
277
277
  lastBinaryNode.appendChild(lastUnaryNode);
278
278
  }
279
-
279
+
280
280
  const name = this._recursiveNames[i];
281
281
 
282
282
  if (this._endsInRecursion[i]) {
@@ -290,6 +290,15 @@ export class ExpressionPattern implements Pattern {
290
290
  const recursiveNode = createNode(name, [lastUnaryNode, ...node.children]);
291
291
  recursiveNode.normalize(lastUnaryNode.startIndex);
292
292
  lastUnaryNode = recursiveNode;
293
+
294
+ if (cursor.hasNext()) {
295
+ cursor.next();
296
+ } else {
297
+ if (lastBinaryNode != null) {
298
+ lastBinaryNode.appendChild(lastUnaryNode);
299
+ }
300
+ break outer;
301
+ }
293
302
  break;
294
303
  }
295
304
  }