clarity-pattern-parser 10.2.8 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clarity-pattern-parser",
3
- "version": "10.2.8",
3
+ "version": "10.2.9",
4
4
  "description": "Parsing Library for Typescript and Javascript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.esm.js",
@@ -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