示例#1
0
    def __init__(self, file: str, line=None, column=None):
        """
        Creates a new result position object that represents the position of a
        result in the source code.

        :param file:        The filename.
        :param line:        The line in file or None, the first line is 1.
        :param column:      The column indicating the character. The first one
                            in a line is 1.
        :raises TypeError:  Raised when
                            - file is not a string or None.
                            - line or columns are no integers.
        """
        TextPosition.__init__(self, line, column)

        self._file = abspath(file)
    def __init__(self, file: str, line=None, column=None):
        """
        Creates a new NlSection Position object that represents the position of
        a NlSection in the original source code having nested languages.

        :param file:        The filename 
        :param line:        The line in the file or None, the first line is 1.
        :param column:      The column indicating the character. The first one
                            in a line is 1.
        :raises TypeError:  Raised when
                            - file is not a string or None
                            - line or column are not integers
        """

        TextPosition.__init__(self, line, column)

        self.file = file