Natural Docs Version 0.9 |
NaturalDocs:: LanguagesA package to manage all the programming languages Natural Docs supports. Usage and Dependencies
Summary
languages
An array of all the defined languages. Each entry is a NaturalDocs::Languages::Language object. extensions
A hash of all the defined languages’ extensions. The keys are the all-lowercase extensions, and the values are indexes into languages. shebangs
A hash of all the defined languages’ strings to search for in the shebang (#!) line. The keys are the all-lowercase strings, and the values are indexes into languages. LanguageOf
Returns the language of the passed source file. Parameters
ReturnsA NaturalDocs::Languages::Language object for the passed file, or undef if the file is not a recognized language. SeparateMember
Separates a class from its member. If there are multiple member separators in the string, it assumes the last one is correct and all previous ones are part of the class name. For example, “package::class::function” will be split into “package::class” and “function”. Parameters
ReturnsAn array. If the string had a member separator in it, the first item will be the class and the second the identifier. If there was no member separator, there will only be one item, which will contain the original string. Add
Adds a language to the package. Parameters
Note that if neither of the comment styles are specified, it is assumed that the entire file should be treated as a comment. |