# dmd.doc

Ddoc documentation generation.

Specification: Documentation Generator

#### Authors

Walter Bright

#### License

Boost License 1.0

Source: doc.d

Documentation: https://dlang.org/phobos/dmd_doc.html

Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/doc.d

- `gendocfile`

  #### Declaration

  `void `gendocfile`(Module `m`);`

- `escapeDdocString`

  #### Declaration

  `void `escapeDdocString`(OutBuffer* `buf`, size_t `start`);`

  Having unmatched parentheses can hose the output of Ddoc, as the macros depend on properly nested parentheses. This function replaces all ( with ( and ) with ) to preserve text literally. This also means macros in the text won't be expanded.

- `DocComment`

  #### Declaration

  `struct `DocComment`;`

  - `parseMacros`

    #### Declaration

    `static void `parseMacros`(Escape* `escapetable`, ref MacroTable `pmacrotable`, const(char)[] `m`);`

    Parse macros out of Macros: section. Macros are of the form: name1 = value1

    #### Discussion

    name2 = value2

  - `parseEscapes`

    #### Declaration

    `static void `parseEscapes`(Escape* `escapetable`, const(char)[] `text`);`

    Parse escapes of the form: /c/string/ where c is a single character. Multiple escapes can be separated by whitespace and/or commas.

  - `parseSections`

    #### Declaration

    `void `parseSections`(const(char)* `comment`);`

    Parse next paragraph out of *pcomment. Update *pcomment to point past paragraph. Returns NULL if no more paragraphs. If paragraph ends in 'identifier:', then (*pcomment)[0 .. idlen] is the identifier.

- `skiptoident`

  #### Declaration

  `size_t `skiptoident`(ref OutBuffer `buf`, size_t `i`);`

  Scan forward to one of: start of identifier beginning of next line end of `buf`

- `isIdStart`

  #### Declaration

  `pure nothrow @nogc bool `isIdStart`(const(char)* `p`);`

  Determine if `p` points to the start of an identifier.

- `isIdTail`

  #### Declaration

  `pure nothrow @nogc bool `isIdTail`(const(char)* `p`);`

  Determine if `p` points to the rest of an identifier.

- `utfStride`

  #### Declaration

  `pure nothrow @nogc int `utfStride`(const(char)* `p`);`

  Return number of bytes in UTF character.