Automattic\WooCommerce\Vendor\GraphQL\Language

Parser::parseDirectiveLocationprivateWC 1.0

Method of the class: Parser{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

Parser::parseDirectiveLocation() code WC 11.0.1

private function parseDirectiveLocation(): NameNode
{
    $start = $this->lexer->token;
    $name = $this->parseName();
    if (DirectiveLocation::has($name->value)) {
        return $name;
    }

    throw $this->unexpected($start);
}