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.browser.js
CHANGED
|
@@ -3607,7 +3607,7 @@
|
|
|
3607
3607
|
const isNot = n.find(n => n.name === "not") != null;
|
|
3608
3608
|
const isOptional = n.find(n => n.name === "is-optional");
|
|
3609
3609
|
const pattern = this._buildPattern(patternNode);
|
|
3610
|
-
const finalPattern = isOptional ? new Optional(pattern.name
|
|
3610
|
+
const finalPattern = isOptional ? new Optional(`optional-${pattern.name}`, pattern) : pattern;
|
|
3611
3611
|
if (isNot) {
|
|
3612
3612
|
return new Not(`not-${finalPattern.name}`, finalPattern);
|
|
3613
3613
|
}
|
|
@@ -3666,7 +3666,7 @@
|
|
|
3666
3666
|
isOptional = true;
|
|
3667
3667
|
}
|
|
3668
3668
|
}
|
|
3669
|
-
return isOptional ? new Optional(name, new Repeat(name
|
|
3669
|
+
return isOptional ? new Optional(name, new Repeat(`inner-optional-${name}`, pattern, options)) : new Repeat(name, pattern, options);
|
|
3670
3670
|
}
|
|
3671
3671
|
_saveConfigurableAnonymous(node) {
|
|
3672
3672
|
const nameNode = node.find(n => n.name === "name");
|