def pretty_print(self, carrot=False):
        """Return a string of this line including linenumber.
        If carrot is True then a line is added under the string with a carrot
        under the current character position.
        """
        lineno = self.lineno
        padding = 0
        if lineno < 1000:
            padding = 1
        if lineno < 100:
            padding = 2
        if lineno < 10:
            padding = 3

        string = str(lineno) + (' ' * padding) + '|' + self.string
        if carrot:
            string += '\n' + (' ' * (self.col + 5))
        return string
Return a string of this line including linenumber.
        If carrot is True then a line is added under the string with a carrot
        under the current character position.