NaturalDocs::Languages::Pascal

NaturalDocs::Languages::Pascal

A subclass to handle the language variations of Pascal and Delphi.

Summary
NaturalDocs::Languages::PascalA subclass to handle the language variations of Pascal and Delphi.
Variables
prototypeDirectivesAn existence hash of all the directives that can appear after a function prototype and will be included.
longPrototypeDirectivesAn existence hash of all the directives with parameters that can appear after a function prototype and will be included.
checkingForDirectivesSet after the first function semicolon, which means we’re in directives mode.
Functions
OnCodeJust overridden to reset checkingForDirectives.
OnPrototypeEndPascal’s syntax has directives after the prototype that should be included.
ParseParameterLine
TypeBeforeParameter

Variables

prototypeDirectives

my %prototypeDirectives

An existence hash of all the directives that can appear after a function prototype and will be included.  The keys are the all lowercase keywords.

longPrototypeDirectives

my %longPrototypeDirectives

An existence hash of all the directives with parameters that can appear after a function prototype and will be included.  The keys are the all lowercase keywords.

checkingForDirectives

my $checkingForDirectives

Set after the first function semicolon, which means we’re in directives mode.

Functions

OnCode

sub OnCode #(...)

Just overridden to reset checkingForDirectives.

OnPrototypeEnd

sub OnPrototypeEnd #(type,
prototypeRef,
ender)

Pascal’s syntax has directives after the prototype that should be included.

function MyFunction ( param1: type ); virtual; abstract;

Parameters

typeThe TopicType of the prototype.
prototypeRefA reference to the prototype so far, minus the ender in dispute.
enderThe ender symbol.

Returns

ENDER_ACCEPTThe ender is accepted and the prototype is finished.
ENDER_IGNOREThe ender is rejected and parsing should continue.  Note that the prototype will be rejected as a whole if all enders are ignored before reaching the end of the code.
ENDER_ACCEPT_AND_CONTINUEThe ender is accepted so the prototype may stand as is.  However, the prototype might also continue on so continue parsing.  If there is no accepted ender between here and the end of the code this version will be accepted instead.
ENDER_REVERT_TO_ACCEPTEDThe expedition from ENDER_ACCEPT_AND_CONTINUE failed.  Use the last accepted version and end parsing.

ParseParameterLine

sub ParseParameterLine #(...)

TypeBeforeParameter

sub TypeBeforeParameter
A class containing the characteristics of a particular programming language for basic support within Natural Docs.
my %prototypeDirectives
An existence hash of all the directives that can appear after a function prototype and will be included.
my %longPrototypeDirectives
An existence hash of all the directives with parameters that can appear after a function prototype and will be included.
my $checkingForDirectives
Set after the first function semicolon, which means we’re in directives mode.
sub OnCode #(...)
Just overridden to reset checkingForDirectives.
sub OnPrototypeEnd #(type,
prototypeRef,
ender)
Pascal’s syntax has directives after the prototype that should be included.
sub ParseParameterLine #(...)
sub TypeBeforeParameter
A string representing a topic type as defined in Topics.txt.
Close