NaturalDocs::Languages::PLSQL

NaturalDocs::Languages::PLSQL

A subclass to handle the language variations of PL/SQL.

Summary
NaturalDocs::Languages::PLSQLA subclass to handle the language variations of PL/SQL.
Functions
OnPrototypeEndMicrosoft’s SQL specifies parameters as shown below.
ParsePrototypeOverridden to handle Microsoft’s parenthesisless version.
ParseParameterLineParses a prototype parameter line and returns it as a NaturalDocs::Languages::Prototype::Parameter object.
TypeBeforeParameter

Functions

OnPrototypeEnd

sub OnPrototypeEnd #(type,
prototypeRef,
ender)

Microsoft’s SQL specifies parameters as shown below.

CREATE PROCEDURE Test @as int, @foo int AS ...

Having a parameter @is or @as is perfectly valid even though those words are also used to end the prototype.  We need to ignore text-based enders preceded by an at sign.  Also note that it does not have parenthesis for parameter lists.  We need to skip all commas if the prototype doesn’t have parenthesis but does have @ characters.

Identifiers such as function names may contain the characters $, #, and _, so if “as” or “is” appears directly after one of them we need to ignore the ender there as well.

FUNCTION Something_is_something ...

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.

ParsePrototype

sub ParsePrototype #(type,
prototype)

Overridden to handle Microsoft’s parenthesisless version.  Otherwise just throws to the parent.

Parameters

typeThe TopicType.
prototypeThe text prototype.

Returns

A NaturalDocs::Languages::Prototype object.

ParseParameterLine

sub ParseParameterLine #(line)

Parses a prototype parameter line and returns it as a NaturalDocs::Languages::Prototype::Parameter object.

TypeBeforeParameter

sub TypeBeforeParameter
A class containing the characteristics of a particular programming language for basic support within Natural Docs.
sub OnPrototypeEnd #(type,
prototypeRef,
ender)
Microsoft’s SQL specifies parameters as shown below.
sub ParsePrototype #(type,
prototype)
Overridden to handle Microsoft’s parenthesisless version.
sub ParseParameterLine #(line)
Parses a prototype parameter line and returns it as a NaturalDocs::Languages::Prototype::Parameter object.
A data class for storing parsed prototype parameters.
sub TypeBeforeParameter
A string representing a topic type as defined in Topics.txt.
A data class for storing parsed prototypes.
Close