clarity-pattern-parser 11.0.0 → 11.0.2

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.
@@ -2637,7 +2637,6 @@
2637
2637
  return Object.assign({}, this._patterns);
2638
2638
  }
2639
2639
  constructor(name, pattern, context = []) {
2640
- this.shouldCompactAst = false;
2641
2640
  this._id = `context-${contextId++}`;
2642
2641
  this._type = "context";
2643
2642
  this._name = name;
@@ -2661,7 +2660,6 @@
2661
2660
  clone(name = this._name) {
2662
2661
  const clone = new Context(name, this._pattern, Object.values(this._patterns));
2663
2662
  clone._id = this._id;
2664
- clone.shouldCompactAst = this.shouldCompactAst;
2665
2663
  return clone;
2666
2664
  }
2667
2665
  getTokens() {
@@ -2809,7 +2807,7 @@
2809
2807
  _compileAtomNode() {
2810
2808
  let node = this._atomNode;
2811
2809
  if (this._prefixNode != null && this._atomNode != null) {
2812
- node = this._prefixNode;
2810
+ node = this._prefixNode.findRoot();
2813
2811
  this._prefixPlaceholder.replaceWith(this._atomNode);
2814
2812
  }
2815
2813
  if (this._postfixNode != null && node != null) {
@@ -3038,6 +3036,7 @@
3038
3036
  cursor.resolveError();
3039
3037
  return node;
3040
3038
  }
3039
+ cursor.moveTo(this._firstIndex);
3041
3040
  cursor.recordErrorAt(this._firstIndex, this._firstIndex, this);
3042
3041
  return null;
3043
3042
  }
@@ -3168,8 +3167,8 @@
3168
3167
  break;
3169
3168
  }
3170
3169
  else {
3171
- cursor.resolveError();
3172
3170
  cursor.moveTo(onIndex);
3171
+ cursor.resolveError();
3173
3172
  }
3174
3173
  }
3175
3174
  if (!foundMatch) {