dmd.doc

Ddoc documentation generation.

Specification: Documentation Generator

Authors

Walter Bright

Source: doc.d

  • Declaration

    void gendocfile(Module m, const char* ddoctext_ptr, size_t ddoctext_length, const char* datetime, ErrorSink eSink, ref OutBuffer outbuf);

    Generate Ddoc file for Module m.

    Parameters

    Module m

    Module

    char* ddoctext_ptr

    combined text of .ddoc files for macro definitions

    size_t ddoctext_length

    extant of ddoctext_ptr

    char* datetime

    charz returned by ctime()

    ErrorSink eSink

    send error messages to eSink

    OutBuffer outbuf

    append the Ddoc text to this

  • Declaration

    void gendocfile(Module m, const char[] ddoctext, const char* datetime, ErrorSink eSink, ref OutBuffer outbuf);

    Generate Ddoc text for Module m and append it to outbuf.

    Parameters

    Module m

    Module

    char[] ddoctext

    combined text of .ddoc files for macro definitions

    char* datetime

    charz returned by ctime()

    ErrorSink eSink

    send error messages to eSink

    OutBuffer outbuf

    append the Ddoc text to this

  • Declaration

    void escapeDdocString(ref 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.

  • Declaration

    struct DocComment;

    • 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

    • 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.

    • 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.