You are here

public function AbstractLexer::isNextTokenAny in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_annotation_discovery/lib/Doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php \Doctrine\Common\Lexer\AbstractLexer::isNextTokenAny()

Checks whether any of the given tokens matches the current lookahead

Parameters

array $tokens:

Return value

boolean

File

modules/providers/service_container_annotation_discovery/lib/Doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php, line 118

Class

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

Namespace

Doctrine\Common\Lexer

Code

public function isNextTokenAny(array $tokens) {
  return null !== $this->lookahead && in_array($this->lookahead['type'], $tokens, true);
}