private function parseUnionMemberTypes()
    {
        $types = [];
        if ($this->skip(Token::EQUALS)) {
            // Optional leading pipe
            $this->skip(Token::PIPE);
            do {
                $types[] = $this->parseNamedType();
            } while ($this->skip(Token::PIPE));
        }

        return $types;
    }
private function parseUnionMemberTypes()
    {
        $types = [];
        if ($this->skip(Token::EQUALS)) {
            
            $this->skip(Token::PIPE);
            do {
                $types[] = $this->parseNamedType();
            } while ($this->skip(Token::PIPE));
        }

        return $types;
    }
private function parseUnionMemberTypes ( ) { $ types = [ ] ; if ( $ this -> skip ( Token :: EQUALS ) ) { // Optional leading pipe $ this -> skip ( Token :: PIPE ) ; do { $ types [ ] = $ this -> parseNamedType ( ) ; } while ( $ this -> skip ( Token :: PIPE ) ) ; } return $ types ; }
UnionMemberTypes :
- = `|`? NamedType
- UnionMemberTypes | NamedType

@return NamedTypeNode[]
UnionMemberTypes : - = | ? NamedType - UnionMemberTypes | NamedType