public function Lexer::isNextToken

Checks whether a given token matches the current lookahead.

Parameters

integer|string $token:

Return value

boolean

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Lexer.php, line 108

Class

Lexer
Base class for writing simple lexers, i.e. for creating small DSLs.

Namespace

Doctrine\Common

Code

public function isNextToken($token) {
  return null !== $this->lookahead && $this->lookahead['type'] === $token;
}