Automattic\WooCommerce\Vendor\GraphQL\Language

Parser::parseNameprivateWC 1.0

Converts a name lex token into a name parse node.

Method of the class: Parser{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

Parser::parseName() code WC 11.1.2

private function parseName(): NameNode
{
    $token = $this->expect(Token::NAME);

    return new NameNode([
        'value' => $token->value,
        'loc' => $this->loc($token),
    ]);
}