parseman 0.7.0 → 0.7.1

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.
@@ -2795,7 +2795,11 @@ function scanTo(sentinel, { skip: skip2 = [], orEOF = false } = {}) {
2795
2795
  };
2796
2796
  }
2797
2797
  function balanced(open, close, options = {}) {
2798
- const inner = scanTo(literal(close), options);
2798
+ const self = ref();
2799
+ const inner = scanTo(literal(close), {
2800
+ ...options,
2801
+ skip: [self, ...options.skip ?? []]
2802
+ });
2799
2803
  const combi = transform(
2800
2804
  sequence(literal(open), inner, literal(close)),
2801
2805
  ([o, content, c]) => o + content + c
@@ -2803,6 +2807,7 @@ function balanced(open, close, options = {}) {
2803
2807
  if (combi._def.tag === "transform") {
2804
2808
  combi._def.fnSrc = "([o, content, c]) => o + content + c";
2805
2809
  }
2810
+ self.define(combi);
2806
2811
  return combi;
2807
2812
  }
2808
2813