Natural Docs Version 1.2 |
NaturalDocs:: Languages:: Base
A base class for all programming language parsers. Summary
ParseFileParses the passed source file, sending comments acceptable for documentation to NaturalDocs::Parser->OnComment(). This must be defined by a subclass. Parameters
ReturnsThe array ( autoTopics, scopeRecord ).
FormatPrototype
Parses a prototype so that it can be formatted nicely in the output. By default, it formats function prototypes assuming the parameter list is enclosed in parenthesis and parameters are separated by commas and semicolons. It leaves all other prototypes alone. Parameters
ReturnsThe array ( preParam, opening, params, closing, postParam ).
MakeSortableSymbol
Returns the symbol that should be used for sorting. For example, in Perl, a scalar variable would be “$var”. However, we would want to sort on “var” so that all scalar variables don’t get dumped into the symbols category in the indexes. By default, this function returns the original symbol. Parameters
ReturnsThe symbol to sort on. If the symbol doesn’t need to be altered, just return name. StripOpeningSymbol
Determines if the line starts with any of the passed symbols, and if so, replaces it with spaces. This only happens if the only thing before it on the line is whitespace. Parameters
ReturnsIf the line starts with any of the passed comment symbols, it will replace it in the line with spaces and return the symbol. If the line doesn’t, it will leave the line alone and return undef. StripClosingSymbol
Determines if the line contains a symbol, and if so, truncates it just before the symbol. Parameters
ReturnsThe array ( symbol, lineRemainder ), or undef if the symbol was not found.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sub New |
sub ShebangStrings |
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||