You are here

private function DocParser::matchAny in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php \Doctrine\Common\Annotations\DocParser::matchAny()

Attempts to match the current lookahead token with any of the given tokens.

If any of them matches, this method updates the lookahead token; otherwise a syntax error is raised.

Parameters

array $tokens:

Return value

boolean

2 calls to DocParser::matchAny()
DocParser::ArrayEntry in modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php
ArrayEntry ::= Value | KeyValuePair KeyValuePair ::= Key ("=" | ":") PlainValue | Constant Key ::= string | integer | Constant
DocParser::Identifier in modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php
Identifier ::= string

File

modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php, line 388

Class

DocParser
A parser for docblock annotations.

Namespace

Doctrine\Common\Annotations

Code

private function matchAny(array $tokens) {
  if (!$this->lexer
    ->isNextTokenAny($tokens)) {
    $this
      ->syntaxError(implode(' or ', array_map(array(
      $this->lexer,
      'getLiteral',
    ), $tokens)));
  }
  return $this->lexer
    ->moveNext();
}