Automattic\WooCommerce\Vendor\GraphQL\Language

Parser::parseImplementsInterfacesprivateWC 1.0

Method of the class: Parser{}

No Hooks.

Returns

NodeList<NamedTypeNode>.

Usage

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

Parser::parseImplementsInterfaces() code WC 11.0.1

private function parseImplementsInterfaces(): NodeList
{
    $types = [];
    if ($this->expectOptionalKeyword('implements')) {
        // Optional leading ampersand
        $this->skip(Token::AMP);
        do {
            $types[] = $this->parseNamedType();
        } while (
            $this->skip(Token::AMP)
            // Legacy support for the SDL?
            || (($this->lexer->options['allowLegacySDLImplementsInterfaces'] ?? false) && $this->peek(Token::NAME))
        );
    }

    return new NodeList($types);
}