DDocParser

Parses a DDoc comment string.

Members

Functions

findNextIdColon
bool findNextIdColon(out cstring ident, out cchar* bodyBegin)

Find next "Identifier:".

parse
Section[] parse(cstring text)

Parses the DDoc text into sections. All newlines in the text must be converted to '\n'.

scanSummaryAndDescription
void scanSummaryAndDescription(cchar* p, cchar* end)

Separates the text between p and end into a summary and an optional description section.

skipLine
void skipLine()

Skips to the beginning of the next non-blank line.

skipWhitespace
void skipWhitespace()

Skips $(SYMLINK3 dil.lexer.Funcs, CProperty.Whitespace, whitespace).

Static functions

isCodeSection
bool isCodeSection(cchar* p, cchar* end)

Returns true if p points to "$(DDD)".

skipCodeSection
bool skipCodeSection(ref cchar* p, cchar* end)

Skips over a code section and sets p one character past it.

Variables

description
Section description;

Optional description section.

p
cchar* p;

Current character pointer.

sections
Section[] sections;

Parsed sections.

summary
Section summary;

Optional summary section.

textEnd
cchar* textEnd;

Points one character past the end of the text.

Meta