Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DocParser.php

function DocParser::match

Same name in this branch
  1. 11.1.x core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php \Drupal\Component\Annotation\Doctrine\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

int $token Type of token.:

Return value

bool True if tokens match; false otherwise.

Throws

AnnotationException

7 calls to DocParser::match()
DocParser::Annotation in vendor/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 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php
Array ::= "{" ArrayEntry {"," ArrayEntry}* [","] "}"
DocParser::FieldAssignment in vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php
FieldAssignment ::= FieldName "=" PlainValue FieldName ::= identifier
DocParser::Identifier in vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php
Identifier ::= string
DocParser::MethodCall in vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php
MethodCall ::= ["(" [Values] ")"]

... See full list

File

vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php, line 405

Class

DocParser
A parser for docblock annotations.

Namespace

Doctrine\Common\Annotations

Code

private function match(int $token) : bool {
    if (!$this->lexer
        ->isNextToken($token)) {
        throw $this->syntaxError($this->lexer
            ->getLiteral($token));
    }
    return $this->lexer
        ->moveNext();
}
RSS feed
Powered by Drupal