protected function parseTokenStream($reflection, $metaInformation, $stream)
{
try {
$pointcut = $this->pointcutParser->parse($stream);
} catch (UnexpectedTokenException $e) {
$token = $e->getToken();
$message = "Unexpected token %s in the `%s` before %s, defined in %s:%d." . PHP_EOL;
$message .= "Expected one of: %s";
$message = sprintf($message, $token->getValue(), $metaInformation->value, (isset($reflection->class) ? $reflection->class . '->' : '') . $reflection->name, method_exists($reflection, 'getFileName') ? $reflection->getFileName() : $reflection->getDeclaringClass()->getFileName(), method_exists($reflection, 'getStartLine') ? $reflection->getStartLine() : 0, join(', ', $e->getExpected()));
throw new \UnexpectedValueException($message, 0, $e);
}
return $pointcut;
}