clarity-pattern-parser 10.2.1 → 10.2.3

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
@@ -2784,11 +2784,11 @@ class ExpressionPattern {
2784
2784
  }
2785
2785
  _isBinaryPattern(pattern) {
2786
2786
  return pattern.type === "sequence" &&
2787
+ pattern.children.length === 3 &&
2787
2788
  pattern.children[0].type === "reference" &&
2788
2789
  pattern.children[0].name === this.name &&
2789
2790
  pattern.children[2].type === "reference" &&
2790
- pattern.children[2].name === this.name &&
2791
- pattern.children.length === 3;
2791
+ pattern.children[2].name === this.name;
2792
2792
  }
2793
2793
  _extractDelimiter(pattern) {
2794
2794
  if (pattern.type === "right-associated") {
@@ -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") {