protected function any(string $openKind, callable $parseFunction, string $closeKind): array
    {
        $this->expect($openKind);

        $nodes = [];

        while (!$this->skip($closeKind)) {
            $nodes[] = $parseFunction();
        }

        return $nodes;
    }
protected function any(string $openKind, callable $parseFunction, string $closeKind): array
    {
        $this->expect($openKind);

        $nodes = [];

        while (!$this->skip($closeKind)) {
            $nodes[] = $parseFunction();
        }

        return $nodes;
    }
protected function any ( string $ openKind , callable $ parseFunction , string $ closeKind ) : array { $ this -> expect ( $ openKind ) ; $ nodes = [ ] ; while ( ! $ this -> skip ( $ closeKind ) ) { $ nodes [ ] = $ parseFunction ( ) ; } return $ nodes ; }
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.

@param string   $openKind
@param callable $parseFunction
@param string   $closeKind
@return array
@throws SyntaxErrorException
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 .