DDocUtils

A namespace for some utility functions.

Members

Static functions

getDDocComment
DDocComment getDDocComment(Node node)

Returns a node's DDocComment.

getDDocComment
DDocComment getDDocComment(cstring text)

Returns a DDocComment created from a text.

getDDocText
cstring getDDocText(Token*[] tokens)

Extracts the text body of the comment tokens.

getDocTokens
Token*[] getDocTokens(Node node, bool function(Token*) isDocComment = &isDDocComment)

Returns the surrounding documentation comment tokens.

isDDocComment
bool isDDocComment(Token* token)

Returns true if token is a DDoc comment.

isDoxygenComment
bool isDoxygenComment(Token* token)

Returns true if token is a Doxygen comment.

sanitize
cstring sanitize(char[] comment, char padding)
cstring sanitize(cstring comment, char padding)

Sanitizes a DDoc comment string.

unindentText
cstring unindentText(cstring text)

Unindents all lines in text by the maximum amount possible. Note: counts tabulators the same as single spaces.

Meta