GraphQL\Language\Parser::many PHP Method

many() public method

Returns a non-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 many ( $openKind, $parseFn, $closeKind ) : array
$openKind
$parseFn
$closeKind
return array
    function many($openKind, $parseFn, $closeKind)
    {
        $this->expect($openKind);
        $nodes = [$parseFn($this)];
        while (!$this->skip($closeKind)) {
            $nodes[] = $parseFn($this);
        }
        return $nodes;
    }