clarity-pattern-parser 11.0.21 → 11.0.22
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 +3 -3
- package/dist/index.browser.js.map +1 -1
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/grammar/Grammar.ts +4 -3
package/dist/index.browser.js
CHANGED
|
@@ -3580,9 +3580,9 @@
|
|
|
3580
3580
|
const firstChild = pattern.children[0];
|
|
3581
3581
|
const lastChild = pattern.children[pattern.children.length - 1];
|
|
3582
3582
|
const isLongEnough = pattern.children.length >= 2;
|
|
3583
|
-
return
|
|
3584
|
-
(firstChild.name === name
|
|
3585
|
-
|
|
3583
|
+
return pattern.type === "sequence" && isLongEnough &&
|
|
3584
|
+
(firstChild.name === name ||
|
|
3585
|
+
lastChild.name === name);
|
|
3586
3586
|
}
|
|
3587
3587
|
_buildPattern(node) {
|
|
3588
3588
|
const type = node.name;
|