Automattic\WooCommerce\Vendor\GraphQL\Language

Lexer::lookaheadpublicWC 1.0

Method of the class: Lexer{}

No Hooks.

Returns

null. Nothing (null).

Usage

$Lexer = new Lexer();
$Lexer->lookahead(): Token;

Lexer::lookahead() code WC 10.9.1

public function lookahead(): Token
{
    $token = $this->token;
    if ($token->kind !== Token::EOF) {
        do {
            $token = $token->next ?? ($token->next = $this->readToken($token));
        } while ($token->kind === Token::COMMENT);
    }

    return $token;
}