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