Package qm :: Package test :: Package classes :: Module compiler :: Class SourcePosition
[hide private]
[frames] | no frames]

Class SourcePosition

source code

A 'SourcePosition' indicates a location in source code.

A 'SourcePosition' consists of:

- A file name.  The file name is a string.  It may be an absolute
  or relative path.  If no file name is available, the file name
  is the empty string.

- A line number, indexed from one.  If no line number is
  available, the line number is zero.

- A column number, indexed from one.  If no column number is
  available, the column nubmer is zero.

Instance Methods [hide private]
 
__init__(self, file, line, column)
Construct a new 'SourcePosition'.
source code
 
__str__(self)
Return a textual representation of this 'SourcePosition'.
source code
Method Details [hide private]

__init__(self, file, line, column)
(Constructor)

source code 

Construct a new 'SourcePosition'.

'file' -- The file name.

'line' -- The line number, indexed from one. If no line numer is availble, use zero for this parameter.

'column' -- The column number, indexed from one. If no column number is available, use zero for this parameter.

__str__(self)
(Informal representation operator)

source code 

Return a textual representation of this 'SourcePosition'.

returns -- A string representing this 'SourcePosition'