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/grammar/patterns/body.d.ts +2 -2
- package/dist/index.browser.js +7 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.esm.js +7 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/patterns/Repeat.d.ts +2 -0
- package/package.json +1 -1
- package/src/grammar/patterns/body.ts +1 -1
- package/src/patterns/Repeat.ts +8 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const body:
|
|
1
|
+
import { Optional } from "../../patterns/Optional";
|
|
2
|
+
export declare const body: Optional;
|
package/dist/index.browser.js
CHANGED
|
@@ -1486,6 +1486,12 @@
|
|
|
1486
1486
|
get children() {
|
|
1487
1487
|
return this._children;
|
|
1488
1488
|
}
|
|
1489
|
+
get min() {
|
|
1490
|
+
return this.children[0].min;
|
|
1491
|
+
}
|
|
1492
|
+
get max() {
|
|
1493
|
+
return this.children[0].max || Infinity;
|
|
1494
|
+
}
|
|
1489
1495
|
constructor(name, pattern, options = {}) {
|
|
1490
1496
|
this._id = `repeat-${idIndex$3++}`;
|
|
1491
1497
|
this._pattern = pattern;
|
|
@@ -2060,7 +2066,7 @@
|
|
|
2060
2066
|
bodyLineContent,
|
|
2061
2067
|
optionalLineSpaces$2,
|
|
2062
2068
|
]);
|
|
2063
|
-
const body = new Repeat("body", bodyLine, { divider: newLine$1
|
|
2069
|
+
const body = new Optional("optional-body", new Repeat("body", bodyLine, { divider: newLine$1 }));
|
|
2064
2070
|
|
|
2065
2071
|
const optionalSpaces$1 = new Optional("optional-spaces", allSpaces);
|
|
2066
2072
|
const optionalLineSpaces$1 = new Optional("options-line-spaces", lineSpaces$1);
|