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.esm.js CHANGED
@@ -1480,6 +1480,12 @@ class Repeat {
1480
1480
  get children() {
1481
1481
  return this._children;
1482
1482
  }
1483
+ get min() {
1484
+ return this.children[0].min;
1485
+ }
1486
+ get max() {
1487
+ return this.children[0].max || Infinity;
1488
+ }
1483
1489
  constructor(name, pattern, options = {}) {
1484
1490
  this._id = `repeat-${idIndex$3++}`;
1485
1491
  this._pattern = pattern;
@@ -2054,7 +2060,7 @@ const bodyLine = new Sequence("body-line", [
2054
2060
  bodyLineContent,
2055
2061
  optionalLineSpaces$2,
2056
2062
  ]);
2057
- const body = new Repeat("body", bodyLine, { divider: newLine$1, min: 0 });
2063
+ const body = new Optional("optional-body", new Repeat("body", bodyLine, { divider: newLine$1 }));
2058
2064
 
2059
2065
  const optionalSpaces$1 = new Optional("optional-spaces", allSpaces);
2060
2066
  const optionalLineSpaces$1 = new Optional("options-line-spaces", lineSpaces$1);