'Returns the next character.'

def __next__(self):

    if (self._idx >= len(self._text)):
        raise StopIteration
    rv = self._text[self._idx]
    if (self._text[self._idx] in ('\n', '\r\n')):
        self._line += 1
        self._col = 0
    else:
        self._col += 1
    self._idx += 1
    return rv
