You are here

public function AbstractLexer::isNextToken in Plug 7

Checks whether a given token matches the current lookahead.

Parameters

integer|string $token:

Return value

boolean

File

lib/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php, line 153

Class

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

Namespace

Doctrine\Common\Lexer

Code

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