clarity-pattern-parser 10.2.2 → 10.2.4

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.esm.js CHANGED
@@ -2812,7 +2812,7 @@ class ExpressionPattern {
2812
2812
  return pattern.type === "sequence" &&
2813
2813
  pattern.children[0].type === "reference" &&
2814
2814
  pattern.children[0].name === this.name &&
2815
- pattern.children.length > 2;
2815
+ pattern.children.length > 1;
2816
2816
  }
2817
2817
  _extractRecursiveTail(pattern) {
2818
2818
  if (pattern.type === "right-associated") {
@@ -2844,6 +2844,7 @@ class ExpressionPattern {
2844
2844
  let lastBinaryNode = null;
2845
2845
  let onIndex = cursor.index;
2846
2846
  outer: while (true) {
2847
+ cursor.resolveError();
2847
2848
  onIndex = cursor.index;
2848
2849
  for (let i = 0; i < this._unaryPatterns.length; i++) {
2849
2850
  cursor.moveTo(onIndex);
@@ -2886,6 +2887,7 @@ class ExpressionPattern {
2886
2887
  }
2887
2888
  cursor.moveTo(onIndex);
2888
2889
  }
2890
+ cursor.resolveError();
2889
2891
  onIndex = cursor.index;
2890
2892
  for (let i = 0; i < this._binaryPatterns.length; i++) {
2891
2893
  cursor.moveTo(onIndex);