src/Parser/Parser.php
protected function parseArgumentList(Node $stmt, array $args = null): array
    {
        $result = [
            $stmt
        ];
        
        $named = false;
        
        foreach ($args as list (, $arg)) {
            if (\is_array($arg)) {
                $named = true;
                $result[$arg[0]] = $arg[1];
            } else {
                if ($named) {
                    throw new \RuntimeException('Positional arguments proceeding named arguments are not allowed');
                }
                
                $result[] = $arg;
            }
        }
        
        return $result;
    }
protected function parseArgumentList(Node $stmt, array $args = null): array
    {
        $result = [
            $stmt
        ];
        
        $named = false;
        
        foreach ($args as list (, $arg)) {
            if (\is_array($arg)) {
                $named = true;
                $result[$arg[0]] = $arg[1];
            } else {
                if ($named) {
                    throw new \RuntimeException('Positional arguments proceeding named arguments are not allowed');
                }
                
                $result[] = $arg;
            }
        }
        
        return $result;
    }
ArgumentList ::= Statement ( ',' ( Statement | NamedArgument ) )*