diff --git a/res/default_ddoc_theme.ddoc b/res/default_ddoc_theme.ddoc new file mode 100644 index 000000000000..801138b3a94d --- /dev/null +++ b/res/default_ddoc_theme.ddoc @@ -0,0 +1,735 @@ +LPAREN = ( +RPAREN = ) +BACKTICK = ` +DOLLAR = $ + +ESCAPES = + /</ + />/>/ + /&/&/ + +B = $0 +I = $0 +U = $0 +P =
$0
+DL =$0$0
+DDOC_BACKQUOTED = $(D_INLINECODE $0)
+D_COMMENT = $0
+D_STRING = $0
+D_KEYWORD = $0
+D_PSYMBOL = $0
+D_PARAM = $0
+
+DDOC_BLANKLINE =
+DDOC_COMMENT =
+
+DDOC =
+
+
+
+
+ $2
+
+
+ $0
+
+
+ $0 +
++ $0 +
++ $0 +
++ $0 +
+
+ $0
+
++ $0 +
++ $0 +
++ $0 +
++ $0 +
++ $0 +
++ $0 +
++ $0 +
++ $0 +
++ $0 +
++ $0 +
++ $0 +
++ $0 +
+$0
+DDOC_ENUM_BASETYPE = $0
+DDOC_PSUPER_SYMBOL = $0
+DDOC_KEYWORD = $0
+DDOC_PARAM = $0
+DDOC_CONSTRAINT = $(DDOC_CONSTRAINT) if ($0)
+DDOC_OVERLOAD_SEPARATOR = $0
+DDOC_TEMPLATE_PARAM_LIST = $0
+DDOC_TEMPLATE_PARAM = $0
diff --git a/src/doc.d b/src/doc.d
index fd30deb8b525..13624f45c4f3 100644
--- a/src/doc.d
+++ b/src/doc.d
@@ -349,120 +349,7 @@ extern (C++) static TemplateDeclaration getEponymousParent(Dsymbol s)
return (td && getEponymousMember(td)) ? td : null;
}
-extern (C++) __gshared const(char)* ddoc_default = "DDOC =
- $(DDOC_COMMENT Generated by Ddoc from $(SRCFILENAME))
-
- $0
-DL =$0-DDOC_BACKQUOTED = $(D_INLINECODE $0) -D_INLINECODE =
$0-D_COMMENT = $(GREEN $0) -D_STRING = $(RED $0) -D_KEYWORD = $(BLUE $0) -D_PSYMBOL = $(U $0) -D_PARAM = $(I $0) - -DDOC_COMMENT = -DDOC_DECL = $(DT $(BIG $0)) -DDOC_DECL_DD = $(DD $0) -DDOC_DITTO = $(BR)$0 -DDOC_SECTIONS = $0 -DDOC_SUMMARY = $0$(BR)$(BR) -DDOC_DESCRIPTION = $0$(BR)$(BR) -DDOC_AUTHORS = $(B Authors:)$(BR) -$0$(BR)$(BR) -DDOC_BUGS = $(RED BUGS:)$(BR) -$0$(BR)$(BR) -DDOC_COPYRIGHT = $(B Copyright:)$(BR) -$0$(BR)$(BR) -DDOC_DATE = $(B Date:)$(BR) -$0$(BR)$(BR) -DDOC_DEPRECATED = $(RED Deprecated:)$(BR) -$0$(BR)$(BR) -DDOC_EXAMPLES = $(B Examples:)$(BR) -$0$(BR)$(BR) -DDOC_HISTORY = $(B History:)$(BR) -$0$(BR)$(BR) -DDOC_LICENSE = $(B License:)$(BR) -$0$(BR)$(BR) -DDOC_RETURNS = $(B Returns:)$(BR) -$0$(BR)$(BR) -DDOC_SEE_ALSO = $(B See Also:)$(BR) -$0$(BR)$(BR) -DDOC_STANDARDS = $(B Standards:)$(BR) -$0$(BR)$(BR) -DDOC_THROWS = $(B Throws:)$(BR) -$0$(BR)$(BR) -DDOC_VERSION = $(B Version:)$(BR) -$0$(BR)$(BR) -DDOC_SECTION_H = $(B $0)$(BR) -DDOC_SECTION = $0$(BR)$(BR) -DDOC_MEMBERS = $(DL $0) -DDOC_MODULE_MEMBERS = $(DDOC_MEMBERS $0) -DDOC_CLASS_MEMBERS = $(DDOC_MEMBERS $0) -DDOC_STRUCT_MEMBERS = $(DDOC_MEMBERS $0) -DDOC_ENUM_MEMBERS = $(DDOC_MEMBERS $0) -DDOC_TEMPLATE_MEMBERS = $(DDOC_MEMBERS $0) -DDOC_ENUM_BASETYPE = $0 -DDOC_PARAMS = $(B Params:)$(BR) -$(TABLE $0)$(BR) -DDOC_PARAM_ROW = $(TR $0) -DDOC_PARAM_ID = $(TD $0) -DDOC_PARAM_DESC = $(TD $0) -DDOC_BLANKLINE = $(BR)$(BR) - -DDOC_ANCHOR = -DDOC_PSYMBOL = $(U $0) -DDOC_PSUPER_SYMBOL = $(U $0) -DDOC_KEYWORD = $(B $0) -DDOC_PARAM = $(I $0) -DDOC_CONSTRAINT = $(DDOC_CONSTRAINT) if ($0) -DDOC_OVERLOAD_SEPARATOR = -DDOC_TEMPLATE_PARAM_LIST = $0 -DDOC_TEMPLATE_PARAM = $0 - -ESCAPES = /</ - />/>/ - /&/&/ -"; +extern (C++) __gshared const(char)* ddoc_default = import("default_ddoc_theme.ddoc"); extern (C++) __gshared const(char)* ddoc_decl_s = "$(DDOC_DECL "; extern (C++) __gshared const(char)* ddoc_decl_e = ")\n"; extern (C++) __gshared const(char)* ddoc_decl_dd_s = "$(DDOC_DECL_DD "; @@ -752,18 +639,19 @@ extern (C++) static Scope* skipNonQualScopes(Scope* sc) return sc; } -extern (C++) static bool emitAnchorName(OutBuffer* buf, Dsymbol s, Scope* sc) +extern (C++) static bool emitAnchorName(OutBuffer* buf, Dsymbol s, Scope* sc, bool includeParent) { if (!s || s.isPackage() || s.isModule()) return false; // Add parent names first bool dot = false; - if (s.parent) - dot = emitAnchorName(buf, s.parent, sc); - else if (sc) - dot = emitAnchorName(buf, sc.scopesym, skipNonQualScopes(sc.enclosing)); + auto eponymousParent = getEponymousParent(s); + if (includeParent && s.parent || eponymousParent) + dot = emitAnchorName(buf, s.parent, sc, includeParent); + else if (includeParent && sc) + dot = emitAnchorName(buf, sc.scopesym, skipNonQualScopes(sc.enclosing), includeParent); // Eponymous template members can share the parent anchor name - if (getEponymousParent(s)) + if (eponymousParent) return dot; if (dot) buf.writeByte('.'); @@ -782,40 +670,59 @@ extern (C++) static bool emitAnchorName(OutBuffer* buf, Dsymbol s, Scope* sc) return true; } -extern (C++) static void emitAnchor(OutBuffer* buf, Dsymbol s, Scope* sc) +extern (C++) static void emitAnchor(OutBuffer* buf, Dsymbol s, Scope* sc, bool forHeader = false) { Identifier ident; { OutBuffer anc; - emitAnchorName(&anc, s, skipNonQualScopes(sc)); + emitAnchorName(&anc, s, skipNonQualScopes(sc), true); ident = Identifier.idPool(anc.peekSlice()); } auto pcount = cast(void*)ident in sc.anchorCounts; typeof(*pcount) count; - if (pcount) + if (!forHeader) { - // Existing anchor, - // don't write an anchor for matching consecutive ditto symbols - TemplateDeclaration td = getEponymousParent(s); - if (sc.prevAnchor == ident && sc.lastdc && (isDitto(s.comment) || (td && isDitto(td.comment)))) - return; + if (pcount) + { + // Existing anchor, + // don't write an anchor for matching consecutive ditto symbols + TemplateDeclaration td = getEponymousParent(s); + if (sc.prevAnchor == ident && sc.lastdc && (isDitto(s.comment) || (td && isDitto(td.comment)))) + return; - count = ++*pcount; - } - else - { - sc.anchorCounts[cast(void*)ident] = 1; - count = 1; + count = ++*pcount; + } + else + { + sc.anchorCounts[cast(void*)ident] = 1; + count = 1; + } } // cache anchor name sc.prevAnchor = ident; - buf.writestring("$(DDOC_ANCHOR "); - buf.writestring(ident.toChars()); + auto macroName = forHeader ? "DDOC_HEADER_ANCHOR" : "DDOC_ANCHOR"; + auto symbolName = ident.toString(); + buf.printf("$(%.*s %.*s", cast(int) macroName.length, macroName.ptr, + cast(int) symbolName.length, symbolName.ptr); // only append count once there's a duplicate if (count > 1) buf.printf(".%u", count); + + if (forHeader) + { + Identifier shortIdent; + { + OutBuffer anc; + emitAnchorName(&anc, s, skipNonQualScopes(sc), false); + shortIdent = Identifier.idPool(anc.peekSlice()); + } + + auto shortName = shortIdent.toString(); + buf.printf(", %.*s", cast(int) shortName.length, shortName.ptr); + } + buf.writeByte(')'); } @@ -962,6 +869,17 @@ extern (C++) void emitComment(Dsymbol s, OutBuffer* buf, Scope* sc) // Put previous doc comment if exists if (DocComment* dc = sc.lastdc) { + assert(dc.a.dim > 0, "Expects at least one declaration for a" ~ + "documentation comment"); + + auto symbol = dc.a[0]; + auto symbolName = symbol.ident.toString; + + buf.writestring("$(DDOC_MEMBER"); + buf.writestring("$(DDOC_MEMBER_HEADER"); + emitAnchor(buf, symbol, sc, true); + buf.writeByte(')'); + // Put the declaration signatures as the document 'title' buf.writestring(ddoc_decl_s); for (size_t i = 0; i < dc.a.dim; i++) @@ -995,6 +913,7 @@ extern (C++) void emitComment(Dsymbol s, OutBuffer* buf, Scope* sc) emitMemberComments(sds, buf, sc); } buf.writestring(ddoc_decl_dd_e); + buf.writeByte(')'); //printf("buf.2 = [[%.*s]]\n", buf->offset - o0, buf->data + o0); } if (s) @@ -1839,11 +1758,12 @@ struct DocComment buf.writestring(cast(char*)c); if (utd.codedoc) { - size_t n = getCodeIndent(utd.codedoc); + auto codedoc = utd.codedoc.stripLeadingNewlines; + size_t n = getCodeIndent(codedoc); while (n--) buf.writeByte(' '); buf.writestring("----\n"); - buf.writestring(utd.codedoc); + buf.writestring(codedoc); buf.writestring("----\n"); highlightText(sc, a, buf, o); } @@ -2817,3 +2737,11 @@ extern (C++) int utfStride(const(char)* p) utf_decodeChar(p, 4, i, c); // ignore errors, but still consume input return cast(int)i; } + +inout(char)* stripLeadingNewlines(inout(char)* s) +{ + while (s && *s == '\n' || *s == '\r') + s++; + + return s; +} diff --git a/src/posix.mak b/src/posix.mak index ea2b1e5ccd9a..b69c3c92c277 100644 --- a/src/posix.mak +++ b/src/posix.mak @@ -312,7 +312,7 @@ TK_SRC = \ $(TK)/filespec.h $(TK)/mem.h $(TK)/list.h $(TK)/vec.h \ $(TK)/filespec.c $(TK)/mem.c $(TK)/vec.c $(TK)/list.c -STRING_IMPORT_FILES = verstr.h SYSCONFDIR.imp +STRING_IMPORT_FILES = verstr.h SYSCONFDIR.imp ../res/default_ddoc_theme.ddoc DEPS = $(patsubst %.o,%.deps,$(DMD_OBJS) $(GLUE_OBJS) $(BACK_OBJS)) @@ -328,14 +328,14 @@ backend.a: $(BACK_OBJS) $(AR) rcs backend.a $(BACK_OBJS) dmd_frontend: $(FRONT_SRCS) gluelayer.d $(ROOT_SRCS) newdelete.o $(STRING_IMPORT_FILES) $(HOST_DMD_PATH) - CC=$(HOST_CXX) $(HOST_DMD_RUN) -of$@ $(MODEL_FLAG) -vtls -J. -L-lstdc++ $(DFLAGS) $(filter-out $(STRING_IMPORT_FILES) $(HOST_DMD_PATH),$^) -version=NoBackend + CC=$(HOST_CXX) $(HOST_DMD_RUN) -of$@ $(MODEL_FLAG) -vtls -J. -J../res -L-lstdc++ $(DFLAGS) $(filter-out $(STRING_IMPORT_FILES) $(HOST_DMD_PATH),$^) -version=NoBackend ifdef ENABLE_LTO dmd: $(DMD_SRCS) $(ROOT_SRCS) newdelete.o $(GLUE_OBJS) $(BACK_OBJS) $(STRING_IMPORT_FILES) $(HOST_DMD_PATH) - CC=$(HOST_CXX) $(HOST_DMD_RUN) -of$@ $(MODEL_FLAG) -vtls -J. -L-lstdc++ $(DFLAGS) $(filter-out $(STRING_IMPORT_FILES) $(HOST_DMD_PATH),$^) + CC=$(HOST_CXX) $(HOST_DMD_RUN) -of$@ $(MODEL_FLAG) -vtls -J. -J../res -L-lstdc++ $(DFLAGS) $(filter-out $(STRING_IMPORT_FILES) $(HOST_DMD_PATH),$^) else dmd: $(DMD_SRCS) $(ROOT_SRCS) newdelete.o glue.a backend.a $(STRING_IMPORT_FILES) $(HOST_DMD_PATH) - CC=$(HOST_CXX) $(HOST_DMD_RUN) -of$@ $(MODEL_FLAG) -vtls -J. -L-lstdc++ $(DFLAGS) $(filter-out $(STRING_IMPORT_FILES) $(HOST_DMD_PATH),$^) + CC=$(HOST_CXX) $(HOST_DMD_RUN) -of$@ $(MODEL_FLAG) -vtls -J. -J../res -L-lstdc++ $(DFLAGS) $(filter-out $(STRING_IMPORT_FILES) $(HOST_DMD_PATH),$^) endif clean: @@ -493,7 +493,7 @@ zip: ifneq ($(DOCDIR),) html: $(DOCDIR)/.generated $(DOCDIR)/.generated: $(DMD_SRCS) $(ROOT_SRCS) $(HOST_DMD_PATH) project.ddoc - $(HOST_DMD_RUN) -of- $(MODEL_FLAG) -J. -c -Dd$(DOCDIR)\ + $(HOST_DMD_RUN) -of- $(MODEL_FLAG) -J. -J../res -c -Dd$(DOCDIR)\ $(DFLAGS) project.ddoc $(DOCFMT) $(DMD_SRCS) $(ROOT_SRCS) touch $@ endif diff --git a/src/win32.mak b/src/win32.mak index 5cb622b378e4..cef9b8bb4d3c 100644 --- a/src/win32.mak +++ b/src/win32.mak @@ -163,6 +163,8 @@ BACK_HDRS=$C/bcomplex.d $C/cc.d $C/cdef.d $C/cgcv.d $C/code.d $C/cv4.d $C/dt.d $ TK_HDRS= $(TK)/dlist.d +STRING_IMPORT_FILES= verstr.h ../res/default_ddoc_theme.ddoc + DMD_SRCS=$(FRONT_SRCS) $(GLUE_SRCS) $(BACK_HDRS) $(TK_HDRS) # Glue layer @@ -293,11 +295,11 @@ backend.lib : $(BACKOBJ) $(OBJ_MSVC) LIBS= glue.lib backend.lib -dmd_frontend.exe: $(FRONT_SRCS) gluelayer.d $(ROOT_SRCS) newdelete.obj verstr.h - $(HOST_DC) $(DSRC) -of$@ -vtls -J. -L/STACK:8388608 $(DFLAGS) $(FRONT_SRCS) gluelayer.d $(ROOT_SRCS) newdelete.obj -version=NoBackend +dmd_frontend.exe: $(FRONT_SRCS) gluelayer.d $(ROOT_SRCS) newdelete.obj $(STRING_IMPORT_FILES) + $(HOST_DC) $(DSRC) -of$@ -vtls -J. -J../res -L/STACK:8388608 $(DFLAGS) $(FRONT_SRCS) gluelayer.d $(ROOT_SRCS) newdelete.obj -version=NoBackend -$(TARGETEXE): $(DMD_SRCS) $(ROOT_SRCS) newdelete.obj $(LIBS) verstr.h - $(HOST_DC) $(DSRC) -of$@ -vtls -J. -L/STACK:8388608 $(DFLAGS) $(DMD_SRCS) $(ROOT_SRCS) newdelete.obj $(LIBS) +$(TARGETEXE): $(DMD_SRCS) $(ROOT_SRCS) newdelete.obj $(LIBS) $(STRING_IMPORT_FILES) + $(HOST_DC) $(DSRC) -of$@ -vtls -J. -J../res -L/STACK:8388608 $(DFLAGS) $(DMD_SRCS) $(ROOT_SRCS) newdelete.obj $(LIBS) ############################ Maintenance Targets ############################# diff --git a/test/compilable/extra-files/ddoc1.html b/test/compilable/extra-files/ddoc1.html index c6bc0da165a1..4713b2646f10 100644 --- a/test/compilable/extra-files/ddoc1.html +++ b/test/compilable/extra-files/ddoc1.html @@ -1,115 +1,1087 @@ - - -
#include <stdio.h>
-void main()
-{
- printf("hello\n");
-}
-
-| char c | -the character which adds c to argulid |
| int argulid | -the argument |
| char u | -the other argument |
+ This module is for ABC + +
+myint
+
+
+ alias
+ myint = int;
+
+
f
+
+
+ myint
+ f;
+
+
+ windy + city + +
+
+ paragraph 2 about of F
+
+
+
+ #include <stdio.h>
+void main()
+{
+ printf("hello\n");
+}
+
+ 1998 +
+E
+
+
+ enum
+ E: int;
+
+
+ comment1 +
+g
+
+
+ int
+ g;
+
+
+ comment2 +
+LS
+
+
+ wchar
+ LS;
+
+
+ UTF line separator +
+PS
+
+
+ wchar
+ PS;
+
+wchar _XX;
+
+wchar YY;
+
+
+ UTF paragraph separator +
+foo
+
+
+ int
+ foo(char c, int argulid, char u);
+
+
+ Function foo takes argument c and adds it to argulid.
+
+
+ Then it munges argulid, u underline.
+
+
+
+ char
+ |
+
+
+
+
+ the character which adds |
+
+
+ int
+ |
+
+
+
++ the argument + + |
+
+
+ char
+ |
+
+
+
++ the other argument + + |
+
barr
+
+
+ int
+ barr();
+
+
+ doc for barr()
+
Bar
+
+
+ class
+ Bar;
+
+
+ The Class Bar
+
Easy
+
+
+ enum
+ Easy: int;
+
+
+ The Enum Easy
+
Foo
+
+
+ struct
+ Foo(T);
+
+struct Foo(T, U);
+
+
+ The foo +
+func1
+
+
+ int
+ func1(T)(T x);
+
+
+ This basic case doesn't work very well. The template signature is + documented twice, but the function signature (argument names and return + type) is not documented at all. This comment is also repeated twice. +
+func2
+
+
+ int
+ func2(T, U)(T x, U y);
+
+int func2(T)(T x);
+
+
+ This comment is also repeated twice, and the second function signature is + not very well documented. +
+func2
+
+
+ int
+ func2()();
+
+
+ Separate overload item. +
+func3
+
+
+ int
+ func3(T, U)(T x, U y);
+
+int func3(T, U = int, V : long)(T x);
+
+
+ This used to work adequately and documented both func3 templates
+ simultaneously. Now, it documents the first template twice and
+ no longer documents the function argument and return types.
+
map
+
+
+ void
+ map(char rs);
+
+void map(int rs);
+
+
+ blah +
+map2
+
+
+ void
+ map2()(char rs);
+
+void map2()(int rs);
+
+
+ blah +
+map3
+
+
+ void
+ map3(char rs);
+
+
+ blah http://www.map3.com map3
+
map4
+
+
+ void
+ map4(string s)(char rs);
+
+
+ blah http://www.map.com map +
+map5
+
+
+ template
+ map5(string s)
+
+ blah http://www.map.com map +
+bar6
+
+
+ struct
+ bar6;
+
+
+ blah +
+Foo7
+
+
+ struct
+ Foo7(T);
+
+
+ template bodies +
+bar
+
+
+ void
+ bar();
+
+
+ Attempt two: Inside. + +
++ Attempt one: Doc outside static if. +
+abc
+
+
+ static void
+ abc();
+
+
+ the abc function should be static
+
Foo8
+
+
+ abstract class
+ Foo8;
+
+
+ show abstract +
+bug4878
+
+
+ void
+ bug4878(string a = ")");
+
+
+ a stray ) mustn't foul the macros
+
S
+
+
+ struct
+ S;
+
+
f10
+
+
+ float
+ f10(float a, float b);
+
+
+ Produces something in (a;b]
+
h10
+
+
+ float
+ h10(float a, float b);
+
+
+ Produces something in [a;b)
+
bug6090
+
+
+ void
+ bug6090(string f = "$(B b)", char g = ')')(string h = "$(", string i = "$)");
+
+
T
+
+
+ struct
+ T;
+
+
x14547
+
+
+ int
+ x14547;
+
+enum int y14547;
+
+
+ doc-comment +
+isInt14547
+
+
+ enum auto
+ isInt14547(T);
+
+enum bool isString14547(T);
+
+static immutable typeName14547(T);
+
+int storageFor14547(T);
+
+
+ doc-comment +
+foo14547
+
+
+ enum int
+ foo14547(T);
+
+template bar14547(T) if (is(T == int))
+
+ doc-comment +
+Foo10334
+
+
+ template
+ Foo10334(T) if (Bar10334!())
+
Foo10334
+
+
+ template
+ Foo10334(T) if (Bar10334!100)
+
Foo10334
+
+
+ template
+ Foo10334(T) if (Bar10334!3.14)
+
Foo10334
+
+
+ template
+ Foo10334(T) if (Bar10334!"str")
+
Foo10334
+
+
+ template
+ Foo10334(T) if (Bar10334!1.4i)
+
Foo10334
+
+
+ template
+ Foo10334(T) if (Bar10334!null)
+
Foo10334
+
+
+ template
+ Foo10334(T) if (Bar10334!true)
+
Foo10334
+
+
+ template
+ Foo10334(T) if (Bar10334!false)
+
Foo10334
+
+
+ template
+ Foo10334(T) if (Bar10334!'A')
+
Foo10334
+
+
+ template
+ Foo10334(T) if (Bar10334!int)
+
Foo10334
+
+
+ template
+ Foo10334(T) if (Bar10334!string)
+
Foo10334
+
+
+ template
+ Foo10334(T) if (Bar10334!([1, 2, 3]))
+
Foo10334
+
+
+ template
+ Foo10334(T) if (Bar10334!(Baz10334!()))
+
Foo10334
+
+
+ template
+ Foo10334(T) if (Bar10334!(Baz10334!T))
+
Foo10334
+
+
+ template
+ Foo10334(T) if (Bar10334!(Baz10334!100))
+
Foo10334
+
+
+ template
+ Foo10334(T) if (Bar10334!(.foo))
+
Foo10334
+
+
+ template
+ Foo10334(T) if (Bar10334!(const(int)))
+
Foo10334
+
+
+ template
+ Foo10334(T) if (Bar10334!(shared(T)))
+
Test10334
+
+
+ template
+ Test10334(T...)
+
S
+
+
+ struct
+ S(T);
+
+
method
+
+
+ void
+ method();
+
+
Nested
+
+
+ struct
+ Nested;
+
+
nestedMethod
+
+
+ void
+ nestedMethod();
+
+
C
+
+
+ class
+ C;
+
+
c1Foo
+
+
+ const void
+ c1Foo();
+
+
i1Foo
+
+
+ immutable void
+ i1Foo();
+
+
c2Foo
+
+
+ immutable void
+ c2Foo();
+
+
i2Foo
+
+
+ immutable void
+ i2Foo();
+
+
private: - int i = 0; --
FE_INVALID
+
+
+
+ FE_INVALID
+
FE_DENORMAL
+
+
+
+ FE_DENORMAL
+
FE_DIVBYZERO
+
+
+
+ FE_DIVBYZERO
+
FE_OVERFLOW
+
+
+
+ FE_OVERFLOW
+
FE_UNDERFLOW
+
+
+
+ FE_UNDERFLOW
+
FE_INEXACT
+
+
+
+ FE_INEXACT
+
FE_ALL_EXCEPT
+
+
+
+ FE_ALL_EXCEPT
+
+ Mask of all the exceptions +
+bar
+
+
+ myint
+ bar;
+
+
foo
+
+
+ myint
+ foo(myint x = myint.max);
+
+
Foo
+
+
+ class
+ Foo;
+
+
this
+
+
+ this(string
+ s);
+
+
div_t
+
+
+ struct
+ div_t;
+
+
ldiv_t
+
+
+ struct
+ ldiv_t;
+
+
lldiv_t
+
+
+ struct
+ lldiv_t;
+
+
div
+
+
+ div_t
+ div(int, int);
+
+
ldiv
+
+
+ ldiv_t
+ ldiv(int, int);
+
+
lldiv
+
+
+ lldiv_t
+ lldiv(long, long);
+
+
calloc
+
+
+ void*
+ calloc(size_t, size_t);
+
+
malloc
+
+
+ void*
+ malloc(size_t);
+
+
+ dittx +
+test1
+
+
+ void
+ test1();
+
+
+ Example:
+
+
+
+ private:
+ int i = 0;
+
S1
+
+
+ struct
+ S1(T);
+
+
S2
+
+
+ struct
+ S2(T);
+
+
S3
+
+
+ struct
+ S3(T);
+
+
a
+
+
+ int
+ a;
+
+
b
+
+
+ int
+ b;
+
+
c
+
+
+ int
+ c;
+
+
d
+
+
+ int
+ d;
+
+
e
+
+
+ int
+ e;
+
+
| int abcd | -none1 |
| int bcdef | -none23 |
| ... | -doo |
| int abcd | -none1 |
| int bcdef | -none23 |
| int[] arr | -doo |
foo
+
+
+ void
+ foo(int abcd, int bcdef, ...);
+
+
+
+ int
+ |
+
+
+
++ none1 + + |
+
+
+ int
+ |
+
+
+
++ none23 + + |
+
+
+ ...
+
+ |
+
+
+
++ doo + + |
+
foo
+
+
+ void
+ foo(int abcd, int bcdef, int[] arr...);
+
+
+
+ int
+ |
+
+
+
++ none1 + + |
+
+
+ int
+ |
+
+
+
++ none23 + + |
+
+
+ int[]
+ |
+
+
+
++ doo + + |
+
file
+
+
+ void
+ file(string arg);
+
+
+ file function name is file, arg defaults to __FILE__ but not _something__
+
| int ü | -first |
| int ÅŸ | -second |
| int ÄŸ | -third |
ruhred
+
+
+ int
+ ruhred;
+
+
+ This documents correctly. +
+rühred
+
+
+ int
+ rühred;
+
+
+ This should too +
+foo
+
+
+ int
+ foo(int ü, int ş, int ğ);
+
+
+ BUG: +The parameters are not listed under Params in the generated output + + +
+
+
+ int
+ |
+
+
+
++ first + + |
+
+
+ int
+ |
+
+
+
++ second + + |
+
+
+ int
+ |
+
+
+
++ third + + |
+
test
+
+
+ void
+ test()(string[] args) if (args[$]);
+
+
i
+
+
+ int
+ i;
+
+
+ i underlined
+i not underlined
+_i force underscore
+
+0 not underscored
+_0 force underscored
+
+
+ 1 underscore:
+
+1_1
+1_a
+a_1
+a_a
+
+2 underscores:
+1__a
+2__b
+
Bug4107
+
+
+ struct
+ Bug4107(T);
+
+
+ struct doc +
+foo
+
+
+ void
+ foo(U)(U u);
+
+
+ templated function doc +
+Bug4107b
+
+
+ struct
+ Bug4107b(T);
+
+
+ alpha +
+| string task | -String description of stuff to do. |
| string[] tasks | -Array of descriptions of stuff to do. |
| int maxJobs | -Max parallel jobs to run while doing stuff. |
doStuff
+
+
+ void
+ doStuff(string task);
+
+void doStuff(string[] tasks, int maxJobs);
+
+
+ My overloaded function. + +
+
+
+ string
+ |
+
+
+
++ String description of stuff to do. + + |
+
+
+ string[]
+ |
+
+
+
++ Array of descriptions of stuff to do. + + |
+
+
+ int
+ |
+
+
+
++ Max parallel jobs to run while doing stuff. + + |
+
+ Documentation comment on module +
+Structure
+
+
+ struct
+ Structure;
+
+
+ -1 +
+variable
+
+
+ P
+ variable;
+
+
+ 0 +
+mNone
+
+
+ V
+ mNone(lazy P p);
+
+
+ 1 +
+mPrefix
+
+
+ pure nothrow V
+ mPrefix(lazy P p);
+
+
+ 2 +
+mSuffix
+
+
+ pure nothrow V
+ mSuffix(lazy P p);
+
+
+ 3 +
+mSuffixTemplate
+
+
+ pure nothrow V
+ mSuffixTemplate(T)(lazy P p, T[] t...);
+
+
+ 5 +
+mScoped
+
+
+ pure nothrow V
+ mScoped(lazy P p);
+
+
+ 6 +
+mAutoPrefix
+
+
+ pure nothrow auto
+ mAutoPrefix(ref P p);
+
+
+ 7 +
+
+
+ pure nothrow auto
+ mAutoTemplateSuffix(alias T)(ref T t);
+
+
+ 9 +
+mColon
+
+
+ pure nothrow V
+ mColon(lazy P p);
+
+
+ 10 +
+Class
+
+
+ class
+ Class;
+
+
+ -1 +
+variable
+
+
+ P
+ variable;
+
+
+ 0 +
+mNone
+
+
+ V
+ mNone(lazy P p);
+
+
+ 1 +
+mPrefix
+
+
+ pure nothrow V
+ mPrefix(lazy P p);
+
+
+ 2 +
+mSuffix
+
+
+ pure nothrow V
+ mSuffix(lazy P p);
+
+
+ 3 +
+mSuffixTemplate
+
+
+ pure nothrow V
+ mSuffixTemplate(T)(lazy P p, T[] t...);
+
+
+ 5 +
+mScoped
+
+
+ pure nothrow V
+ mScoped(lazy P p);
+
+
+ 6 +
+mAutoPrefix
+
+
+ pure nothrow auto
+ mAutoPrefix(ref P p);
+
+
+ 7 +
+
+
+ pure nothrow auto
+ mAutoTemplateSuffix(alias T)(ref T t);
+
+
+ 9 +
+mColon
+
+
+ pure nothrow V
+ mColon(lazy P p);
+
+
+ 10 +
+variable
+
+
+ P
+ variable;
+
+
+ 0 +
+mNone
+
+
+ V
+ mNone(lazy P p);
+
+
+ 1 +
+mPrefix
+
+
+ pure nothrow V
+ mPrefix(lazy P p);
+
+
+ 2 +
+mSuffix
+
+
+ pure nothrow V
+ mSuffix(lazy P p);
+
+
+ 3 +
+mSuffixTemplate
+
+
+ pure nothrow V
+ mSuffixTemplate(T)(lazy P p, T[] t...);
+
+
+ 5 +
+mScoped
+
+
+ pure nothrow V
+ mScoped(lazy P p);
+
+
+ 6 +
+mAutoPrefix
+
+
+ pure nothrow auto
+ mAutoPrefix(ref P p);
+
+
+ 7 +
+
+
+ pure nothrow auto
+ mAutoTemplateSuffix(alias T)(ref T t);
+
+
+ 9 +
+mColon
+
+
+ pure nothrow V
+ mColon(lazy P p);
+
+
+ 10 +
+-int iShouldAppearInTheDocs; --
+ Module docs. +
+
+ Ddoc'd unittest
+
+
+
+ int iShouldAppearInTheDocs;
+
Z14778
+
+
+ template
+ Z14778(T)
+
+ docs for Z +
+E
+
+
+ enum
+ E;
+
+
+ docs for E
+
x
+
+
+ enum auto
+ x;
+
+
+ docs for x
+
mv
+
+
+ auto
+ mv;
+
+
+ docs for mv
+
wv
+
+
+ inout
+ wv;
+
+
+ docs for wv
+
cv
+
+
+ const
+ cv;
+
+
+ doc for cv
+
wcv
+
+
+ inout const
+ wcv;
+
+
+ docs for wcv
+
sv
+
+
+ shared
+ sv;
+
+
+ doc for sv
+
swv
+
+
+ shared inout
+ swv;
+
+
+ doc for swv
+
scv
+
+
+ shared const
+ scv;
+
+
+ doc for scv
+
swcv
+
+
+ shared inout const
+ swcv;
+
+
+ docs for swcv
+
iv
+
+
+ immutable
+ iv;
+
+
+ doc for iv
+
// Computes the interval [x,y) - auto interval = computeInterval(x, y); --
+ My module
+
+
+
+ // Computes the interval [x,y)
+ auto interval = computeInterval(x, y);
+
| string msg | -the red blue green yellow. |
| int foo | -next parameter which is a much longer - message spanning multiple - lines. |
+ Summary + +
++ Description1 + + + Description2 + + + Description3 + + +
++ Things to see also. + + + And more things. +
+StreamException
+
+
+ class
+ StreamException: object.Exception;
+
+
+ A base class for stream exceptions. +
+this
+
+
+ this(string
+ msg, int foo);
+
+
+ Construct a StreamException with given error message msg.
+
+
+
+ string
+ |
+
+
+
++ the red blue green yellow. + + |
+
+
+ int
+ |
+
+
+
++ next parameter which is a much longer + message spanning multiple + lines. + + |
+
stars
+
+
+ int
+ stars;
+
+
+ stars
+
B
+
+
+ interface
+ B: ddoc2273.C, ddoc2273.D;
+
+
Foo
+
+
+ class
+ Foo: ddoc2273.A, ddoc2273.B;
+
+
min
+
+
+ MinType!(T1, T2, T)
+ min(T1, T2, T...)(T1 a, T2 b, T xs);
+
+
max
+
+
+ Templ!([1, 2, 3])
+ max(T...)();
+
+
Base64Impl
+
+
+ template
+ Base64Impl(char Map62th, char Map63th, char Padding)
+
sqlite3_config
+
+
+ int
+ sqlite3_config(int, ...);
+
+
IndexOf
+
+
+ alias
+ IndexOf = staticIndexOf(T, TList...);
+
+
| 1 | 2 | 3 |
| 4 | 5 | 6 |
pragma( name ); - pragma( name , option [ option ] ); - ( -
| string msg | -the red blue green yellow. |
| int foo | -next parameter which is a much longer - message spanning multiple - lines. |
+ Summary + +
++ Description1 + + + Description2 + + + Description3 + + +
+
+ Things to see also.
+
+
+ And more things
+ 'arg1, arg2, arg3' : arg1, arg2, arg3.
+ 'arg2, arg3' : arg2, arg3.
+ 'arg1' : arg1.
+ 'arg2' : arg2.
+ 'arg3' : arg3.
+
+
+ Things to see also world.
+
+
+
| 1 | 2 | 3 |
| 4 | 5 | 6 |
pragma( name );
+ pragma( name , option [ option ] );
+ (
+ StreamException
+
+
+ class
+ StreamException: object.Exception;
+
+
+ A base class for stream exceptions. +
+this
+
+
+ this(string
+ msg, int foo);
+
+
+ Construct a StreamException with given error message msg.
+
+
+
+ string
+ |
+
+
+
++ the red blue green yellow. + + |
+
+
+ int
+ |
+
+
+
++ next parameter which is a much longer + message spanning multiple + lines. + + |
+
stars
+
+
+ int
+ stars;
+
+
+ stars
+
A
+
+
+ interface
+ A;
+
+
staticHello
+
+
+ static void
+ staticHello();
+
+
hello
+
+
+ final void
+ hello();
+
+
| int idx | -index |
+ Test module + +
+TestMembers
+
+
+ class
+ TestMembers(TemplateArg);
+
+
+ class to test DDOC on members +
+
+
+ static void
+ PublicStaticMethod(int idx);
+
+
+ a static method + +
+
+
+ int
+ |
+
+
+
++ index + + |
+
This_Foo
+
+
+ alias
+ This_Foo = ddoc5446a.A_Foo;
+
+
This_Foo_Alias
+
+
+ alias
+ This_Foo_Alias = ddoc5446a.A_Foo;
+
+
This_Int
+
+
+ alias
+ This_Int = int;
+
+
This_Enum
+
+
+ alias
+ This_Enum = ddoc5446a.A_Enum;
+
+
A_Enum_New
+
+
+ deprecated alias
+ A_Enum_New = ddoc5446b.A_Enum_New;
+
+
Bar
+
+
+ struct
+ Bar;
+
+
Bar_A_Foo
+
+
+ alias
+ Bar_A_Foo = ddoc5446a.A_Foo;
+
+
Bar_A_Foo_Alias
+
+
+ alias
+ Bar_A_Foo_Alias = ddoc5446a.A_Foo;
+
+
Bar_A_Int
+
+
+ alias
+ Bar_A_Int = int;
+
+
Bar_This_Foo
+
+
+ alias
+ Bar_This_Foo = ddoc5446a.A_Foo;
+
+
+
+ alias
+ Bar_This_Foo_Alias = ddoc5446a.A_Foo;
+
+
Bar_This_Int
+
+
+ alias
+ Bar_This_Int = int;
+
+
Nested_Alias
+
+
+ alias
+ Nested_Alias = Nested;
+
+
Fake_Nested
+
+
+ alias
+ Fake_Nested = .Nested;
+
+
Nested
+
+
+ struct
+ Nested;
+
+
MyStruct
+
+
+ struct
+ MyStruct(T);
+
+
Mixin1
+
+
+ template
+ Mixin1()
+
+ Mixin declaration +
+S
+
+
+ struct
+ S;
+
+
+ struct S
+
A
+
+
+ class
+ A;
+
+
AB
+
+
+ class
+ AB;
+
+
+ class AB
+
x
+
+
+ int
+ x;
+
+
+ field x
+
Mixin2
+
+
+ template
+ Mixin2()
+
+ Mixin declaration2 +
+S2
+
+
+ struct
+ S2;
+
+
+ struct S2
+
Mixin3
+
+
+ template
+ Mixin3()
+
+ Mixin declaration3 +
+f
+
+
+ int
+ f;
+
+
+ another field +
+B1
+
+
+ class
+ B1;
+
+
Mixin4
+
+
+ template
+ Mixin4()
+
+ Mixin declaration3 +
+f
+
+
+ int
+ f;
+
+
+ another field +
+B2
+
+
+ class
+ B2;
+
+
+ class B2
+
f
+
+
+ int
+ f;
+
+
+ another field +
+f
+
+
+ int
+ f;
+
+
+ another field +
+S2
+
+
+ struct
+ S2;
+
+
+ struct S2
+
TS
+
+
+ struct
+ TS(T);
+
+
field
+
+
+ int
+ field;
+
+
bug6491a
+
+
+ void
+ bug6491a(int a = ddoc6491.c6491, string b = core.cpuid.vendor);
+
+
+ test +
+E1
+
+
+ enum
+ E1: int;
+
+
E2
+
+
+ enum
+ E2: int;
+
+
E3
+
+
+ enum
+ E3: int;
+
+
E4
+
+
+ enum
+ E4: int;
+
+
E5
+
+
+ enum
+ E5: int;
+
+
foo
+
+
+ void
+ foo();
+
+
+ Some doc +
+bar
+
+
+ alias
+ bar = foo;
+
+
+ More doc +
+C
+
+
+ abstract class
+ C;
+
+
+ asdf +
+foo
+
+
+ abstract void
+ foo();
+
+
+ Some doc +
+dummy
+
+
+ void
+ dummy();
+
+
+ Dummy doc. + +
++ DelimitedString + TokenString + + + DelimitedString + TokenString + + +HexString +HexString + + +HexString +HexString + + +HexString +HexString + + +HexString +HexString + + +HexString +HexString + + +HexString +HexString + + +HexString +HexString + + +HexString +HexString + + +
+int x; // This is a $ comment (and here is some -int y; // more information about that comment) --
assert(add(1, 1) == 2); --
main
+
+
+ void
+ main();
+
+
+
+
+
+ int x; // This is a $ comment (and here is some
+int y; // more information about that comment)
+
add
+
+
+ int
+ add(int a, int b);
+
+
+ (Regression check) + +
+
+ Example:
+
+
+
+ assert(add(1, 1) == 2);
+
string s = "$1$2 $ $4"; --
Foo
+
+
+ class
+ Foo(T): Bar;
+
+
+ foo +
+ddoc8271
+
+
+ void
+ ddoc8271();
+
+
+ Macro + +
+dg
+
+
+ void delegate(int a)
+ dg;
+
+
dg2
+
+
+ void delegate(int b)
+ dg2;
+
+
dg3
+
+
+ void delegate(int c)[]
+ dg3;
+
+
dg4
+
+
+ void delegate(int d)*
+ dg4;
+
+
Template
+
+
+ template
+ Template(T)
+
+ Template Documentation (OK)
+
Function
+
+
+ void
+ Function(T)(T x);
+
+
+ Function Documentation (Not included at all by DDoc)
+
Class
+
+
+ class
+ Class(T);
+
+
+ Class Documentation (OK)
+
Struct
+
+
+ struct
+ Struct(T);
+
+
+ Struct Documentation
+
Union
+
+
+ union
+ Union(T);
+
+
+ Union Documentation
+
+
+ template
+ TemplateWithAnonEnum(T)
+
+ Template documentation with anonymous enum +
+D d = d; --
D d = d; --
test9037
+
+
+ void
+ test9037();
+
+
+ Example:
+
+
+
+ D d = d;
+
+
+ D d = d;
+
import std.stdio; //&
-writeln("Hello world!");
-if (test) {
- writefln("D programming language");
-}
-
- algorithm;
-
-xxx; //comment
- yyy;
-/* test
- * comment
- */
-
-// Create MIME Base64 with CRLF, per line 76.
-File f = File("./text.txt", "r");
-uint line = 0;
-// The ElementType of data is not aggregation type
-foreach (encoded; Base64.encoder(data))
-
-wstring ws;
-transcode("hello world",ws);
- // transcode from UTF-8 to UTF-16
-
-
-import std.stdio; //&
-writeln("Hello world!");
-if (test) {
- writefln("D programming language");
-}
-
- algorithm;
-
-xxx; //comment
- yyy;
-/+ test
- + comment
- +/
-
-#!/usr/bin/env rdmd -// Computes average line length for standard input. -import std.stdio; --
writefln(q"EOS -This -is a multi-line -heredoc string -EOS" -); --
foo
+
+
+ void
+ foo();
+
+
+ Note: +test document note + 2nd line + +
+
+ Example:
+
+
+
+ import std.stdio; //&
+writeln("Hello world!");
+if (test) {
+ writefln("D programming language");
+}
+
+ algorithm;
+
+xxx; //comment
+ yyy;
+/* test
+ * comment
+ */
+
+// Create MIME Base64 with CRLF, per line 76.
+File f = File("./text.txt", "r");
+uint line = 0;
+// The ElementType of data is not aggregation type
+foreach (encoded; Base64.encoder(data))
+
+
+ wstring ws;
+transcode("hello world",ws);
+ // transcode from UTF-8 to UTF-16
+
+ Example:
+
+
+
+ import std.stdio; //&
+writeln("Hello world!");
+if (test) {
+ writefln("D programming language");
+}
+
+ algorithm;
+
+xxx; //comment
+ yyy;
+/+ test
+ + comment
+ +/
+
+
+ #!/usr/bin/env rdmd
+// Computes average line length for standard input.
+import std.stdio;
+
+
+ writefln(q"EOS
+This
+is a multi-line
+heredoc string
+EOS"
+);
+
foo
+
+
+ void
+ foo(alias p = (a) => a)();
+
+
+ foo()
+
X
+
+
+ template
+ X(alias pred = (x) => x)
+template X(alias pred = (x)
+{
+int y;
+return y;
+}
+)
+template X(alias pred = (int x) => x)
+template X(alias pred = (int x)
+{
+int y;
+return y;
+}
+)
+
X
+
+
+ template
+ X(alias pred = function (x) => x)
+template X(alias pred = function (x)
+{
+return x + 1;
+}
+)
+template X(alias pred = function (int x) => x)
+template X(alias pred = function (int x)
+{
+return x + 1;
+}
+)
+template X(alias pred = function int(x) => x)
+template X(alias pred = function int(x)
+{
+return x + 1;
+}
+)
+template X(alias pred = function int(int x) => x)
+template X(alias pred = function int(int x)
+{
+return x + 1;
+}
+)
+
X
+
+
+ template
+ X(alias pred = delegate (x) => x)
+template X(alias pred = delegate (x)
+{
+return x + 1;
+}
+)
+template X(alias pred = delegate (int x) => x)
+template X(alias pred = delegate (int x)
+{
+return x + 1;
+}
+)
+template X(alias pred = delegate int(x) => x)
+template X(alias pred = delegate int(x)
+{
+return x + 1;
+}
+)
+template X(alias pred = delegate int(int x) => x)
+template X(alias pred = delegate int(int x)
+{
+return x + 1;
+}
+)
+
a=1; -writeln(AddressOf!a); -Exclamation -QuestionMark --
foo
+
+
+ void
+ foo();
+
+
+ Sample:
+
+
+
+ a=1;
+writeln(AddressOf!a);
+Exclamation
+QuestionMark
+
-// comment 1
-foreach (i; 0 .. 10)
-{
- // comment 2
- documentedFunction();
-}
-
--// bar comment --
foo
+
+
+ void
+ foo();
+
+
+ foo
+
+
+
+
+ // comment 1
+foreach (i; 0 .. 10)
+{
+ // comment 2
+ documentedFunction();
+}
+
bar
+
+
+ void
+ bar();
+
+
+ bar
+
+
+
+
+ // bar comment
+
foo
+
+
+ void
+ foo();
+
+
+ foo function.
+
+
+ Args: + +
+foo
+
+
+ void
+ foo();
+
+
+ foo function.
+
+
+ Args: +$(XYZ arg1, arg2) +
+foo
+
+
+ void
+ foo();
+
+
+ foo function.
+
+
+ Args: +arg1, arg2 +
+foo
+
+
+ void
+ foo();
+
+
+ foo function.
+
+
+ Args: +ERROR_UNDEFINED_MACRO: "XYZ" +
+foo
+
+
+
+ deprecated void ;
+
+ foo()
foo
+
+
+ deprecated void
+ foo();
+
+
-foo(1); --
-foo(2); --
-foo(3); --
foo
+
+
+ void
+ foo(int x);
+
+
+ The function foo.
+
+
+
+
+ foo(1);
+
+ foo can be used like this:
+
+
+
+ foo(2);
+
+ foo can also be used like this:
+
+
+
+ foo(3);
+
// Check ddoc9764 comment. -ddoc9764(); -- -
// Check ddoc9764 comment.
+ddoc9764();
+S9903X
+
+
+ struct
+ S9903X;
+
+struct S9903Y;
+
+
+ sss +
+C9903X
+
+
+ class
+ C9903X;
+
+class C9903Y;
+
+
+ ccc +
+U9903X
+
+
+ union
+ U9903X;
+
+union U9903Y;
+
+
+ uuu +
+I9903X
+
+
+ interface
+ I9903X;
+
+interface I9903Y;
+
+
+ iii +
+E9903X
+
+
+ enum
+ E9903X: int;
+
+enum E9903Y: int;
+
+
+ eee +
+a9903
+
+
+
+ a9903
+b9903
+
+ ea +
+c9903
+
+
+
+ c9903
+
+ ec +
+year
+
+
+ int
+ year;
+
+
+ 2016 +
+core.time, + + + + + +
+ Closely related to std.datetime is core.time,
and some of the time types used in std.datetime come from there - such as
, , and
.
core.time is publically imported into std.datetime, it isn't necessary
- to import it separately.
+ to import it separately.
+
test
+
+
+ void
+ test();
+
+
+ This should produce inline code.
+
test2
+
+
+ void
+ test2();
+
+
+ But `this should NOT be inline' + +
+
+ However, restarting on a new line should be inline again.
+
foo
+
+ This int should show highlight on foo;foo, but not int.
+
int foo;should show highlight on foo, but not int.
-assert(foo(1, 1) == 2); --
-// documented -assert(bar()); --
assert(add(1, 1) == 2); --
-// documented -assert(add(3, 3) == 6); -assert(add(4, 4) == 8); --
-// documented -assert(add(5, 5) == 10); -assert(add(6, 6) == 12); --
-Foo foo = new Foo; --
-SomeClass sc = new SomeClass; --
-Outer outer = new Outer; --
-Inner inner = new Inner; --
foo(1); -- -
foo(2); --
-foo(2); --
-foo(4); --
fooImport(); --
fooStaticImport(); --
fooPublicImport(); --
fooSelectiveImport(); --
fooRenamedImport(); --
int x1a; --
int x1b; --
int x4a; --
int x4b; --
int x6a; --
int x6b; --
foo9474(); --
bar9474(); --
S9474 s; --
int v = autovar9474; --
int n = autofun9474(); --
alias Template9474!() T; --
fooNoDescription(); --
if (true) {fooNoDescription(); } /* comment */
-
-foo9757(); bar9757(); --
bar9757(); foo9757(); --
-auto rbt1 = redBlackTree(0, 1, 5, 7);
-auto rbt2 = redBlackTree!string("hello", "world");
-auto rbt3 = redBlackTree!true(0, 1, 5, 7, 5);
-auto rbt4 = redBlackTree!"a > b"(0, 1, 5, 7);
-
-
-auto s = "1 + (2 * (3 + 1 / 2)";
-assert(!balancedParens10519(s, '(', ')'));
-
--int a = 1; --
-int[] arr; --
fun14594a(); --
fun14594b(); fun14594b(1); --
fun14594c(); fun14594c(1); --
fun14594d(); --
fun14594d(1); --
fun14594e(); --
fun14594f(); --
foo
+
+
+ int
+ foo(int a, int b);
+
+
+ foo function - 1 example
+
+
+
+
+ assert(foo(1, 1) == 2);
+
bar
+
+
+ bool
+ bar();
+
+
+ bar function - 1 example
+
+
+
+
+ // documented
+assert(bar());
+
+ placeholder + +
+doo
+
+
+ void
+ doo();
+
+
+ doo function - no examples
+
add
+
+
+ int
+ add(int a, int b);
+
+
+ add function - 3 examples
+
+
+
+
+
+ assert(add(1, 1) == 2);
+
+
+
+
+ // documented
+assert(add(3, 3) == 6);
+assert(add(4, 4) == 8);
+
+
+
+
+ // documented
+assert(add(5, 5) == 10);
+assert(add(6, 6) == 12);
+
Foo
+
+
+ class
+ Foo;
+
+
+ class Foo
+
+
+
+
+ Foo foo = new Foo;
+
SomeClass
+
+
+ class
+ SomeClass;
+
+
+ some class - 1 example +
+
+
+
+
+ SomeClass sc = new SomeClass;
+
Outer
+
+
+ class
+ Outer;
+
+
+ Outer - 1 example
+
+
+
+
+ Outer outer = new Outer;
+
Inner
+
+
+ class
+ Inner;
+
+
+ Inner
+
+
+
+
+ Inner inner = new Inner;
+
foobar
+
+
+ void
+ foobar();
+
+
+ foobar - no examples
+
foo
+
+
+ void
+ foo(int x);
+
+
+ func - 4 examples + +
+
+
+
+
+ foo(1);
+
+
+
+
+ foo(2);
+
+
+
+
+ foo(2);
+
+
+
+
+ foo(4);
+
fooImport
+
+
+ void
+ fooImport();
+
+
+ test
+
+
+
+ fooImport();
+
fooStaticImport
+
+
+ void
+ fooStaticImport();
+
+
+ test
+
+
+
+ fooStaticImport();
+
fooPublicImport
+
+
+ void
+ fooPublicImport();
+
+
+ test
+
+
+
+ fooPublicImport();
+
+
+ void
+ fooSelectiveImport();
+
+
+ test
+
+
+
+ fooSelectiveImport();
+
fooRenamedImport
+
+
+ void
+ fooRenamedImport();
+
+
+ test
+
+
+
+ fooRenamedImport();
+
+
+ void
+ fooConditionalDecl1a();
+
+
+
+
+
+ int x1a;
+
+
+ void
+ fooConditionalDecl1b();
+
+
+
+
+
+ int x1b;
+
+
+ void
+ fooConditionalDecl3a();
+
+
+
+ void
+ fooConditionalDecl3b();
+
+
+
+ void
+ barConditionalDecl4a();
+
+
+
+
+
+ int x4a;
+
+
+ void
+ barConditionalDecl4b();
+
+
+
+
+
+ int x4b;
+
+
+ void
+ barConditionalDecl6a();
+
+
+
+
+
+ int x6a;
+
+
+ void
+ barConditionalDecl6b();
+
+
+
+
+
+ int x6b;
+
foo9474
+
+
+ void
+ foo9474();
+
+
+ Example
+
+
+
+ foo9474();
+
bar9474
+
+
+ void
+ bar9474();
+
+
+ doc +
+
+ Example
+
+
+
+ bar9474();
+
S9474
+
+
+ struct
+ S9474;
+
+
+
+
+
+ S9474 s;
+
autovar9474
+
+
+ int
+ autovar9474;
+
+
+
+
+
+ int v = autovar9474;
+
autofun9474
+
+
+ auto
+ autofun9474();
+
+
+
+
+
+ int n = autofun9474();
+
Template9474
+
+
+ template
+ Template9474()
+
+
+
+
+ alias Template9474!() T;
+
foo
+
+
+ void
+ foo();
+
+
+ Shouldn't link following unittest to here +
+fooNoDescription
+
+
+ void
+ fooNoDescription();
+
+
+
+
+
+ fooNoDescription();
+
+
+
+
+ if (true) {fooNoDescription(); } /* comment */
+
foo9757
+
+
+ void
+ foo9757();
+
+void bar9757();
+
+void baz9757();
+
+
+ test for bugzilla 9757 +
+
+
+
+
+ foo9757(); bar9757();
+
+
+
+
+ bar9757(); foo9757();
+
redBlackTree
+
+
+ auto
+ redBlackTree(E)(E[] elems...);
+
+auto redBlackTree(bool allowDuplicates, E)(E[] elems...);
+
+auto redBlackTree(alias less, E)(E[] elems...);
+
+
+ with template functions +
+
+
+
+
+ auto rbt1 = redBlackTree(0, 1, 5, 7);
+auto rbt2 = redBlackTree!string("hello", "world");
+auto rbt3 = redBlackTree!true(0, 1, 5, 7, 5);
+auto rbt4 = redBlackTree!"a > b"(0, 1, 5, 7);
+
foo
+
+
+ void
+ foo();
+
+
+ test +
++ +
+
+
+ bool
+ balancedParens10519(string, char, char);
+
+
+
+
+
+ auto s = "1 + (2 * (3 + 1 / 2)";
+assert(!balancedParens10519(s, '(', ')'));
+
S12097
+
+
+ struct
+ S12097;
+
+void f12097();
+
+struct T12097(T);
+
+
+ declaration +
+
+ ddoc code 1
+
+
+
+ int a = 1;
+
+ ddoc code 2
+
+
+
+ int[] arr;
+
foo
+
+
+ void
+ foo();
+
+
+ method +
+fun14594a
+
+
+ void
+ fun14594a()();
+
+
+ testA +
+
+
+
+
+ fun14594a();
+
fun14594b
+
+
+ void
+ fun14594b()();
+
+void fun14594b(T)(T);
+
+
+ testB +
+
+
+
+
+ fun14594b(); fun14594b(1);
+
fun14594c
+
+
+ void
+ fun14594c()();
+
+void fun14594c(T)(T);
+
+
+ testC +
+
+
+
+
+ fun14594c(); fun14594c(1);
+
fun14594d
+
+
+ void
+ fun14594d()();
+
+void fun14594d(T)(T);
+
+
+ testD +
+
+
+
+
+ fun14594d();
+
+
+
+
+ fun14594d(1);
+
fun14594e
+
+
+ void
+ fun14594e()();
+
+
+ testE + +
+
+ concatenated doc-comment fun14594e
+
+ doc-unittest fun14594e
+
+
+
+ fun14594e();
+
fun14594f
+
+
+ void
+ fun14594f()();
+
+void fun14594f(T)(T);
+
+
+ testF + +
+
+ concatenated doc-comment fun14594f
+
+ doc-unittest fun14594f
+
+
+
+ fun14594f();
+