Automattic\WooCommerce\Vendor\GraphQL\Language

Parser::parseDirectiveLocationsprivateWC 1.0

Method of the class: Parser{}

No Hooks.

Returns

NodeList<NameNode>.

Usage

// private - for code of main (parent) class only
$result = $this->parseDirectiveLocations(): NodeList;

Parser::parseDirectiveLocations() code WC 11.1.2

private function parseDirectiveLocations(): NodeList
{
    // Optional leading pipe
    $this->skip(Token::PIPE);
    $locations = [];
    do {
        $locations[] = $this->parseDirectiveLocation();
    } while ($this->skip(Token::PIPE));

    return new NodeList($locations);
}