private function parseTokenStream($reflection, string $pointcutExpression, TokenStream $stream): PointFilter
    {
        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(),
                $pointcutExpression,
                (isset($reflection->class) ? $reflection->class . '->' : '') . $reflection->name,
                method_exists($reflection, 'getFileName')
                    ? $reflection->getFileName()
                    : $reflection->getDeclaringClass()->getFileName(),
                method_exists($reflection, 'getStartLine')
                    ? $reflection->getStartLine()
                    : 0,
                implode(', ', $e->getExpected())
            );
            throw new UnexpectedValueException($message, 0, $e);
        }

        return $pointcut;
    }