Automattic\WooCommerce\Vendor\GraphQL\Language

Parser::peekprivateWC 1.0

Determines if the next token is of a given kind.

Method of the class: Parser{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->peek( $kind ): bool;
$kind(string) (required)
.

Parser::peek() code WC 11.0.1

private function peek(string $kind): bool
{
    return $this->lexer->token->kind === $kind;
}