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.
@@ -2760,7 +2760,11 @@ function scanTo(sentinel, { skip: skip2 = [], orEOF = false } = {}) {
2760
2760
  };
2761
2761
  }
2762
2762
  function balanced(open, close, options = {}) {
2763
- const inner = scanTo(literal(close), options);
2763
+ const self = ref();
2764
+ const inner = scanTo(literal(close), {
2765
+ ...options,
2766
+ skip: [self, ...options.skip ?? []]
2767
+ });
2764
2768
  const combi = transform(
2765
2769
  sequence(literal(open), inner, literal(close)),
2766
2770
  ([o, content, c]) => o + content + c
@@ -2768,6 +2772,7 @@ function balanced(open, close, options = {}) {
2768
2772
  if (combi._def.tag === "transform") {
2769
2773
  combi._def.fnSrc = "([o, content, c]) => o + content + c";
2770
2774
  }
2775
+ self.define(combi);
2771
2776
  return combi;
2772
2777
  }
2773
2778