private function DocParser::syntaxError in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php \Doctrine\Common\Annotations\DocParser::syntaxError()
Generates a new syntax error.
Parameters
string $expected Expected string.:
array|null $token Optional token.:
Return value
void
Throws
5 calls to DocParser::syntaxError()
- DocParser::Identifier in modules/
providers/ service_container_annotation_discovery/ lib/ Doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ DocParser.php - Identifier ::= string
- DocParser::match in modules/
providers/ service_container_annotation_discovery/ lib/ Doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ DocParser.php - Attempts to match the given token with the current lookahead token. If they match, updates the lookahead token; otherwise raises a syntax error.
- DocParser::matchAny in modules/
providers/ service_container_annotation_discovery/ lib/ Doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ DocParser.php - Attempts to match the current lookahead token with any of the given tokens.
- DocParser::PlainValue in modules/
providers/ service_container_annotation_discovery/ lib/ Doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ DocParser.php - PlainValue ::= integer | string | float | boolean | Array | Annotation
- DocParser::Values in modules/
providers/ service_container_annotation_discovery/ lib/ Doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ DocParser.php - Values ::= Array | Value {"," Value}* [","]
File
- modules/
providers/ service_container_annotation_discovery/ lib/ Doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ DocParser.php, line 407
Class
- DocParser
- A parser for docblock annotations.
Namespace
Doctrine\Common\AnnotationsCode
private function syntaxError($expected, $token = null) {
if ($token === null) {
$token = $this->lexer->lookahead;
}
$message = sprintf('Expected %s, got ', $expected);
$message .= $this->lexer->lookahead === null ? 'end of string' : sprintf("'%s' at position %s", $token['value'], $token['position']);
if (strlen($this->context)) {
$message .= ' in ' . $this->context;
}
$message .= '.';
throw AnnotationException::syntaxError($message);
}