TLanguageParser
Declaration
TLanguageParser = class
Visibility
global
Source
commonclasses.pas on line 329
Description
Parses input files. Parsing comments is done by TCommentParser, except for the comment-start commands, which are recognized and parsed by TLanguageParser..
Members
Name
|
Type
|
Visibility
|
Synopsis
|
GetDependencies
|
function
|
public
|
Returns a list of all files on which the unit or program in afile depends.
|
GetImplementationDependencies
|
function
|
public
|
Returns a list of files on which the implementation of the module in afile depends.
|
ParseIdentifierRef
|
function
|
public
|
Converts a qualified reference to an identifier into a reference to a section within TDocWriter.
|
ParseCode
|
function
|
public
|
Parses a piece of code converting it to a TTextObject.
|
ScopeResolutionToken
|
function
|
public
|
Returns the token used for scope resolution.
|
IgnoreCase
|
function
|
public
|
Returns true if the case of identifiers is insignificant.
|
ParseFile
|
procedure
|
public
|
Parses a file;.
|
ParseImplementation
|
procedure
|
public
|
Parses an implementation of a given file if the file has a separate implementation.
|
|
TLanguageParser.GetDependencies
Declaration
function GetDependencies(afile : TFileStream) : TStrings; virtual; abstract;
Visibility
public
Source
commonclasses.pas on line 351
Description
Returns a list of all files on which the unit or program in afile depends. If the implementation and the interface reside in the same file it should retrun a list of the interface dependencies. The result should be destroyed by the caller.
TLanguageParser.GetImplementationDependencies
Declaration
function GetImplementationDependencies(afile : TFileStream) : TStrings; virtual; abstract;
Visibility
public
Source
commonclasses.pas on line 359
Description
Returns a list of files on which the implementation of the module in afile depends. If the implementation is not in the same file as the interface, then this method should return an empty list and GetDependencies should return all dependencies for a given file, regardless of whether the file is an interface or an implementation file. The result should be destroyed by the caller;.
TLanguageParser.ParseIdentifierRef
Declaration
function ParseIdentifierRef(ref : String) : String; virtual; abstract;
Visibility
public
Source
commonclasses.pas on line 363
Description
Converts a qualified reference to an identifier into a reference to a section within TDocWriter.
TLanguageParser.ParseCode
Declaration
function ParseCode(code : String) : TTextObject; virtual; abstract;
Visibility
public
Source
commonclasses.pas on line 365
Description
Parses a piece of code converting it to a TTextObject.
TLanguageParser.ScopeResolutionToken
Declaration
function ScopeResolutionToken : String; virtual; abstract;
Visibility
public
Source
commonclasses.pas on line 367
Description
Returns the token used for scope resolution.
TLanguageParser.IgnoreCase
Declaration
function IgnoreCase : Boolean; virtual; abstract;
Visibility
public
Source
commonclasses.pas on line 369
Description
Returns true if the case of identifiers is insignificant.
TLanguageParser.ParseFile
Declaration
procedure ParseFile(afile : TFileStream); virtual; abstract;
Visibility
public
Source
commonclasses.pas on line 332
Description
Parses a file;.
TLanguageParser.ParseImplementation
Declaration
procedure ParseImplementation(afile : TFileStream); virtual; abstract;
Visibility
public
Source
commonclasses.pas on line 345
Description
Parses an implementation of a given file if the file has a separate implementation. If the interface and the implementation reside both in the same file (like in pascal/Delphi) then ParseFile should parse the interface only and ParseImplementation the implementation part. If the implementation is in a separate file (like in C/C++) then this should register this file to be parsed via Driver.RegisterFile. It should not parse the file in this case, since the file may have already been parsed and it would be parsed twice, but instead ParseFile should parse whole files regardless of whether they are an interface or an implementation;.