Class AParserSyntaxError
Unit
parsing
Declaration
type AParserSyntaxError = class(ALoggedError)
Description
This class represents a syntax error that is logged by a parser to a given instance of ALog. It is defined for convenience, since ALoggedError 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 AParserSyntaxError.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 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 ALoggedError: 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-01-10 17:13:18
|