You are here

private function DocParser::match in Service Container 7.2

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

Attempts to match the given token with the current lookahead token. If they match, updates the lookahead token; otherwise raises a syntax error.

Parameters

integer $token Type of token.:

Return value

boolean True if tokens match; false otherwise.

7 calls to DocParser::match()
DocParser::Annotation in modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php
Annotation ::= "@" AnnotationName MethodCall AnnotationName ::= QualifiedName | SimpleName QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName NameSpacePart ::= identifier | null | false |…
DocParser::Arrayx in modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php
Array ::= "{" ArrayEntry {"," ArrayEntry}* [","] "}"
DocParser::FieldAssignment in modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php
FieldAssignment ::= FieldName "=" PlainValue FieldName ::= identifier
DocParser::Identifier in modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php
Identifier ::= string
DocParser::MethodCall in modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php
MethodCall ::= ["(" [Values] ")"]

... See full list

File

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

Class

DocParser
A parser for docblock annotations.

Namespace

Doctrine\Common\Annotations

Code

private function match($token) {
  if (!$this->lexer
    ->isNextToken($token)) {
    $this
      ->syntaxError($this->lexer
      ->getLiteral($token));
  }
  return $this->lexer
    ->moveNext();
}