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

Class Diagnostic

source code

A 'Diagnostic' is a message issued by a compiler.

Each 'Diagnostic' has the following attributes:

- The source position that the compiler associates with the
  diagnostic.

- The severity of the diagnostic.

- The message issued by the compiler.

A 'Diagnostic' may either be an actual diagnostic emitted by a
compiler, or it may be the pattern for a diagnostic that might be
emitted.  In the latter case, the message is a regular expression
indicating the message that should be emitted.

Instance Methods [hide private]
 
__init__(self, source_position, severity, message)
Construct a new 'Diagnostic'.
source code
 
__str__(self)
Return an informal representation of this 'Diagnostic'.
source code
Method Details [hide private]

__init__(self, source_position, severity, message)
(Constructor)

source code 

Construct a new 'Diagnostic'.

'source_position' -- A 'SourcePosition' indicating where the diagnostic was issued. For an expected diagnostic, 'None' indicates that the position does not matter.

'severity' -- A string indicating the severity of the diagnostic. For an expected diagnostic, 'None' indicates that the severity does not matter.

'message' -- For an emitted diagnostic, a string indicating the message produced by the compiler. For an expected diagnostic, a string giving a regular expression indicating the message that might be emitted. For an expected diagnostic, 'None' indicates that the message does not matter.

__str__(self)
(Informal representation operator)

source code 

Return an informal representation of this 'Diagnostic'.

returns -- A string representing this 'Diagnostic'.