clarity-pattern-parser 10.2.10 → 10.2.12

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.
@@ -2923,9 +2923,9 @@
2923
2923
  cursor.resolveError();
2924
2924
  cursor.moveTo(onIndex);
2925
2925
  }
2926
- cursor.resolveError();
2927
2926
  onIndex = cursor.index;
2928
2927
  for (let i = 0; i < this._binaryPatterns.length; i++) {
2928
+ cursor.resolveError();
2929
2929
  cursor.moveTo(onIndex);
2930
2930
  const pattern = this._binaryPatterns[i];
2931
2931
  const name = this._binaryNames[i];
@@ -2947,7 +2947,7 @@
2947
2947
  }
2948
2948
  else if (lastBinaryNode != null && lastUnaryNode != null && delimiterNode != null) {
2949
2949
  const precedence = this._precedenceMap[name];
2950
- const lastPrecendece = lastBinaryNode == null ? 0 : this._precedenceMap[lastBinaryNode.name] || -1;
2950
+ const lastPrecendece = lastBinaryNode == null ? 0 : this._precedenceMap[lastBinaryNode.name] == null ? -1 : this._precedenceMap[lastBinaryNode.name];
2951
2951
  const association = this._binaryAssociation[i];
2952
2952
  if (precedence === lastPrecendece && association === Association.right) {
2953
2953
  const node = createNode(name, [lastUnaryNode, delimiterNode]);