Skip to content

Commit 88c517f

Browse files
committed
Allow ... placeholder to appear in the middle of arguments
1 parent 676ad71 commit 88c517f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/php/lang/ast/syntax/PHP.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1755,7 +1755,7 @@ public function arguments($parse) {
17551755
$parse->forward();
17561756

17571757
// Resolve ambiguity between unpack and variadic placeholder at the end of arguments
1758-
if (')' === $parse->token->value) {
1758+
if (')' === $parse->token->value || ',' === $parse->token->value) {
17591759
$callable= true;
17601760
$arguments[$offset]= Placeholder::$VARIADIC;
17611761
} else {

0 commit comments

Comments
 (0)