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.js
CHANGED
|
@@ -3578,9 +3578,9 @@ class Grammar {
|
|
|
3578
3578
|
const firstChild = pattern.children[0];
|
|
3579
3579
|
const lastChild = pattern.children[pattern.children.length - 1];
|
|
3580
3580
|
const isLongEnough = pattern.children.length >= 2;
|
|
3581
|
-
return
|
|
3582
|
-
(firstChild.name === name
|
|
3583
|
-
|
|
3581
|
+
return pattern.type === "sequence" && isLongEnough &&
|
|
3582
|
+
(firstChild.name === name ||
|
|
3583
|
+
lastChild.name === name);
|
|
3584
3584
|
}
|
|
3585
3585
|
_buildPattern(node) {
|
|
3586
3586
|
const type = node.name;
|