Skip to content

Commit 831b34f

Browse files
committed
skip alternation (|) tokens
1 parent 2e6f270 commit 831b34f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Type/Regex/RegexGroupParser.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,10 @@ private function createGroupType(TreeNode $group, bool $maybeConstant, string $p
296296
if ($rootAlternation !== null) {
297297
$types = [];
298298
foreach ($rootAlternation->getChildren() as $alternative) {
299+
if ($alternative->getValueToken() === 'alternation') {
300+
continue;
301+
}
302+
299303
$types[] = $this->createGroupType($alternative, $maybeConstant, $patternModifiers);
300304
}
301305

0 commit comments

Comments
 (0)