diff --git a/src/Xpath/Expression/SequenceExpression.php b/src/Xpath/Expression/SequenceExpression.php index 788a541..b2c9e3e 100644 --- a/src/Xpath/Expression/SequenceExpression.php +++ b/src/Xpath/Expression/SequenceExpression.php @@ -51,7 +51,9 @@ public function supports(Lexer $lexer): bool $key = $lexer->key() + 1; $commaFound = false; - while ($nextToken = $lexer->peek($key)) { + while ($lexer->peek($key) !== '') { + $nextToken = $lexer->peek($key); + if ($nextToken === '(') { return false; } diff --git a/test/Stubs/Xpath/Sequence/constructor-integer.xsl b/test/Stubs/Xpath/Sequence/constructor-integer.xsl index 0c0936f..098691d 100644 --- a/test/Stubs/Xpath/Sequence/constructor-integer.xsl +++ b/test/Stubs/Xpath/Sequence/constructor-integer.xsl @@ -4,7 +4,7 @@ - +