Automattic\WooCommerce\Vendor\GraphQL\Language

Parser::parseDirectiveprivateWC 1.0

Method of the class: Parser{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->parseDirective( $isConst ): DirectiveNode;
$isConst(true|false) (required)
.

Parser::parseDirective() code WC 11.0.1

private function parseDirective(bool $isConst): DirectiveNode
{
    $start = $this->lexer->token;
    $this->expect(Token::AT);

    return new DirectiveNode([
        'name' => $this->parseName(),
        'arguments' => $this->parseArguments($isConst),
        'loc' => $this->loc($start),
    ]);
}