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/package.json
CHANGED
package/src/grammar/Grammar.ts
CHANGED
|
@@ -291,9 +291,10 @@ export class Grammar {
|
|
|
291
291
|
const firstChild = pattern.children[0];
|
|
292
292
|
const lastChild = pattern.children[pattern.children.length - 1];
|
|
293
293
|
const isLongEnough = pattern.children.length >= 2;
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
(
|
|
294
|
+
|
|
295
|
+
return pattern.type === "sequence" && isLongEnough &&
|
|
296
|
+
(firstChild.name === name ||
|
|
297
|
+
lastChild.name === name);
|
|
297
298
|
}
|
|
298
299
|
|
|
299
300
|
private _buildPattern(node: Node): Pattern {
|