GraphQL\Language\Parser::any PHP Method

any() public method

Returns a possibly empty list of parse nodes, determined by the parseFn. This list begins with a lex token of openKind and ends with a lex token of closeKind. Advances the parser to the next lex token after the closing token.
public any ( integer $openKind, callable $parseFn, integer $closeKind ) : array
$openKind integer
$parseFn callable
$closeKind integer
return array
    function any($openKind, $parseFn, $closeKind)
    {
        $this->expect($openKind);
        $nodes = [];
        while (!$this->skip($closeKind)) {
            $nodes[] = $parseFn($this);
        }
        return $nodes;
    }