def resolve_notation(self, view, token, current):
        '''
        Returns a line number.
        '''
        if isinstance(token, TokenDot):
            pt = view.text_point(current, 0)
            return row_at(view, pt)

        if isinstance(token, TokenDigits):
            return max(int(str(token)) - 1, -1)

        if isinstance(token, TokenPercent):
            return row_at(view, view.size())

        if isinstance(token, TokenDollar):
            return row_at(view, view.size())

        if isinstance(token, TokenOffset):
            return current + sum(token.content)

        if isinstance(token, TokenSearchForward):
            start_pt = view.text_point(current, 0)
            match = view.find(str(token)[1:-1], start_pt)
            if not match:
                # TODO: Convert this to a VimError or something like that.
                raise ValueError('pattern not found')
            return row_at(view, match.a)

        if isinstance(token, TokenSearchBackward):
            start_pt = view.text_point(current, 0)
            match = reverse_search_by_pt(view, str(token)[1:-1], 0, start_pt)
            if not match:
                # TODO: Convert this to a VimError or something like that.
                raise ValueError('pattern not found')
            return row_at(view, match.a)

        if isinstance(token, TokenMark):
            return self.resolve_mark(view, token)

        raise NotImplementedError()
dataset/ETHPy150Open guillermooo/Vintageous/ex/parser/nodes.py/RangeNode.resolve_notation/original