Automattic\WooCommerce\Vendor\GraphQL\Language
Parser::skip
If the next token is of the given kind, return true after advancing the parser. Otherwise, do not change the parser state and return false.
Method of the class: Parser{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->skip( $kind ): bool;
- $kind(string) (required)
- .
Parser::skip() Parser::skip code WC 11.0.1
private function skip(string $kind): bool
{
$match = $this->lexer->token->kind === $kind;
if ($match) {
$this->lexer->advance();
}
return $match;
}