function DocParser::matchAny
Same name in this branch
- 11.1.x core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php \Drupal\Component\Annotation\Doctrine\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.
@phpstan-param list<mixed[]> $tokens
Throws
2 calls to DocParser::matchAny()
- DocParser::ArrayEntry in vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ DocParser.php - ArrayEntry ::= Value | KeyValuePair KeyValuePair ::= Key ("=" | ":") PlainValue | Constant Key ::= string | integer | Constant
- DocParser::Identifier in vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ DocParser.php - Identifier ::= string
File
-
vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ DocParser.php, line 424
Class
- DocParser
- A parser for docblock annotations.
Namespace
Doctrine\Common\AnnotationsCode
private function matchAny(array $tokens) : bool {
if (!$this->lexer
->isNextTokenAny($tokens)) {
throw $this->syntaxError(implode(' or ', array_map([
$this->lexer,
'getLiteral',
], $tokens)));
}
return $this->lexer
->moveNext();
}