Class AParserHint
Unit
parsing
Declaration
type AParserHint = class(ALoggedHint)
Description
This class represents a hint that is logged by a parser to a given instance of ALog. It is defined for convenience, since ALoggedHint could be used instead; however, this class changes the format of the message output to the log so that it includes the file name of the source being parsed, if available, and the line number within that source.
Hierarchy
Overview
Fields
Methods
Description
Fields
|
MyScanner: AScanner; |
Refers to the scanner used to parse the source
|
Methods
|
constructor inSource(const ThisScanner: AScanner; const fmt: string; const params: array of const); virtual; |
Construct a new logged parser message.
When AParserHint.toString is called, ThisScanner will be queried for the name of the source being parsed and the current line number in that source; both of these items will be output along with the message constructed from fmt and params .
|
|
function init: boolean; override; |
Initializer
|
|
function shallowCopyFrom(const Other: AnObject): boolean; override; |
Construct a shallow copy of the other object.
This method overrides the behavior inherited from ALoggedItem.shallowCopyFrom: it calls that method, then checks to see whether Other is an instance of AParserHint. If so, it copies the value of AParserHint.Scanner from Other to Self , overwriting the value in Self .
|
|
function toString: AnsiString; override; |
Construct and return a string representation of the item, suitable for output to a text-based device, such as a console.
This method builds on the behavior inherited from ALoggedHint: it calls the inherited routine, then prepends the name of the source file and the current line number within that source, according to the format specified by pmsgStringRepresentation.
|
|
function Scanner: AScanner; virtual; |
Retrieve a reference to the scanner that will be queried for source name and line information.
The caller should NOT free this reference.
|
Generated by PasDoc 0.13.0 on 2015-06-25 11:12:03
|