Class TParser

Unit

Declaration

type TParser = class(TObject)

Description

Parser class that will process a complete unit file and all of its include files, regarding directives. When creating this object constructor Create takes as an argument an input stream and a list of directives. Parsing work is done by calling ParseUnitOrProgram method. If no errors appear, should return a TPasUnit object with all information on the unit. Else exception is raised.

Things that parser inits in items it returns:

It doesn't init other values. E.g. AbstractDescription or DetailedDescription of TPasItem should be inited while expanding this item's tags. E.g. SourceFileDateTime and SourceFileName of TPasUnit must be set by other means.

Source: source/component/PasDoc_Parser.pas (line 162).

Hierarchy

Show Additional Members:

Overview

Methods

Public constructor Create( const InputStream: TStream; const Directives: TStringVector; const IncludeFilePaths: TStringVector; const OnMessageEvent: TPasDocMessageEvent; const VerbosityLevel: Cardinal; const AStreamName, AStreamAbsoluteFileName: string; const AHandleMacros: boolean);
Public destructor Destroy; override;
Public procedure ParseUnitOrProgram(var U: TPasUnit);

Properties

Public property OnMessage: TPasDocMessageEvent read FOnMessage write FOnMessage;
Public property CommentMarkers: TStringList read FCommentMarkers write SetCommentMarkers;
Public property MarkersOptional: boolean read fMarkersOptional write fMarkersOptional;
Public property IgnoreLeading: string read FIgnoreLeading write FIgnoreLeading;
Public property IgnoreMarkers: TStringList read FIgnoreMarkers write SetIgnoreMarkers;
Public property ShowVisibilities: TVisibilities read FShowVisibilities write FShowVisibilities;
Public property ImplicitVisibility: TImplicitVisibility read FImplicitVisibility write FImplicitVisibility;
Public property AutoBackComments: boolean read FAutoBackComments write FAutoBackComments;
Public property InfoMergeType: TInfoMergeType read FInfoMergeType write FInfoMergeType;

Description

Methods

Public constructor Create( const InputStream: TStream; const Directives: TStringVector; const IncludeFilePaths: TStringVector; const OnMessageEvent: TPasDocMessageEvent; const VerbosityLevel: Cardinal; const AStreamName, AStreamAbsoluteFileName: string; const AHandleMacros: boolean);

Create a parser, initialize the scanner with input stream S. All strings in SD are defined compiler directives.

Source: source/component/PasDoc_Parser.pas (line 556).

Public destructor Destroy; override;

Release all dynamically allocated memory.

Source: source/component/PasDoc_Parser.pas (line 566).

Public procedure ParseUnitOrProgram(var U: TPasUnit);

This does the real parsing work, creating U unit and parsing InputStream and filling all U properties.

Source: source/component/PasDoc_Parser.pas (line 570).

Properties

Public property OnMessage: TPasDocMessageEvent read FOnMessage write FOnMessage;

This item has no description.

Source: source/component/PasDoc_Parser.pas (line 572).

Public property CommentMarkers: TStringList read FCommentMarkers write SetCommentMarkers;

This item has no description.

Source: source/component/PasDoc_Parser.pas (line 573).

Public property MarkersOptional: boolean read fMarkersOptional write fMarkersOptional;

This item has no description.

Source: source/component/PasDoc_Parser.pas (line 574).

Public property IgnoreLeading: string read FIgnoreLeading write FIgnoreLeading;

This item has no description.

Source: source/component/PasDoc_Parser.pas (line 575).

Public property IgnoreMarkers: TStringList read FIgnoreMarkers write SetIgnoreMarkers;

This item has no description.

Source: source/component/PasDoc_Parser.pas (line 576).

Public property ShowVisibilities: TVisibilities read FShowVisibilities write FShowVisibilities;

This item has no description.

Source: source/component/PasDoc_Parser.pas (line 577).

Public property ImplicitVisibility: TImplicitVisibility read FImplicitVisibility write FImplicitVisibility;

See command-line option --implicit-visibility documentation at --implicit-visibility documentation.

Source: source/component/PasDoc_Parser.pas (line 582).

Public property AutoBackComments: boolean read FAutoBackComments write FAutoBackComments;

See command-line option --auto-back-comments documentation at --auto-back-comments documentation.

Source: source/component/PasDoc_Parser.pas (line 586).

Public property InfoMergeType: TInfoMergeType read FInfoMergeType write FInfoMergeType;

Whether to read comments from the implementation, and how to merge them with the interface comments.

Source: source/component/PasDoc_Parser.pas (line 589).


Generated by PasDoc 1.0.2.