src/Language/Parser.php
protected function many($openKind, $parseFn, $closeKind)
    {
        $this->expect($openKind);
        $nodes = [$parseFn($this)];

        while (!$this->skip($closeKind)) {
            array_push($nodes, $parseFn($this));
        }

        return $nodes;
    }
protected function many($openKind, $parseFn, $closeKind)
    {
        $this->expect($openKind);
        $nodes = [$parseFn($this)];

        while (!$this->skip($closeKind)) {
            array_push($nodes, $parseFn($this));
        }

        return $nodes;
    }
protected function many ( $ openKind , $ parseFn , $ closeKind ) { $ this -> expect ( $ openKind ) ; $ nodes = [ $ parseFn ( $ this ) ] ; while ( ! $ this -> skip ( $ closeKind ) ) { array_push ( $ nodes , $ parseFn ( $ this ) ) ; } return $ nodes ; }
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.

@param int $openKind
@param callable $parseFn
@param int $closeKind

@return array
Returns a non - empty list of parse nodes determined by the parseFn .