Automattic\WooCommerce\Vendor\GraphQL\Language

Parser::parseArgumentprivateWC 1.0

Method of the class: Parser{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

Parser::parseArgument() code WC 11.1.1

private function parseArgument(): ArgumentNode
{
    $start = $this->lexer->token;
    $name = $this->parseName();

    $this->expect(Token::COLON);
    $value = $this->parseValueLiteral(false);

    return new ArgumentNode([
        'name' => $name,
        'value' => $value,
        'loc' => $this->loc($start),
    ]);
}