clarity-pattern-parser 9.1.0 → 9.2.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.
package/dist/index.js CHANGED
@@ -1484,6 +1484,12 @@ class Repeat {
1484
1484
  get children() {
1485
1485
  return this._children;
1486
1486
  }
1487
+ get min() {
1488
+ return this.children[0].min;
1489
+ }
1490
+ get max() {
1491
+ return this.children[0].max || Infinity;
1492
+ }
1487
1493
  constructor(name, pattern, options = {}) {
1488
1494
  this._id = `repeat-${idIndex$3++}`;
1489
1495
  this._pattern = pattern;
@@ -2058,7 +2064,7 @@ const bodyLine = new Sequence("body-line", [
2058
2064
  bodyLineContent,
2059
2065
  optionalLineSpaces$2,
2060
2066
  ]);
2061
- const body = new Repeat("body", bodyLine, { divider: newLine$1, min: 0 });
2067
+ const body = new Optional("optional-body", new Repeat("body", bodyLine, { divider: newLine$1 }));
2062
2068
 
2063
2069
  const optionalSpaces$1 = new Optional("optional-spaces", allSpaces);
2064
2070
  const optionalLineSpaces$1 = new Optional("options-line-spaces", lineSpaces$1);