clarity-pattern-parser 11.0.12 → 11.0.14
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.browser.js +2 -2
- package/dist/index.browser.js.map +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/grammar/Grammar.test.ts +3 -3
- package/src/grammar/Grammar.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -3605,7 +3605,7 @@ class Grammar {
|
|
|
3605
3605
|
const isNot = n.find(n => n.name === "not") != null;
|
|
3606
3606
|
const isOptional = n.find(n => n.name === "is-optional");
|
|
3607
3607
|
const pattern = this._buildPattern(patternNode);
|
|
3608
|
-
const finalPattern = isOptional ? new Optional(pattern.name
|
|
3608
|
+
const finalPattern = isOptional ? new Optional(`optional-${pattern.name}`, pattern) : pattern;
|
|
3609
3609
|
if (isNot) {
|
|
3610
3610
|
return new Not(`not-${finalPattern.name}`, finalPattern);
|
|
3611
3611
|
}
|
|
@@ -3664,7 +3664,7 @@ class Grammar {
|
|
|
3664
3664
|
isOptional = true;
|
|
3665
3665
|
}
|
|
3666
3666
|
}
|
|
3667
|
-
return isOptional ? new Optional(name, new Repeat(name
|
|
3667
|
+
return isOptional ? new Optional(name, new Repeat(`inner-optional-${name}`, pattern, options)) : new Repeat(name, pattern, options);
|
|
3668
3668
|
}
|
|
3669
3669
|
_saveConfigurableAnonymous(node) {
|
|
3670
3670
|
const nameNode = node.find(n => n.name === "name");
|