Mercurial > projects > ldc
diff dmd/doc.c @ 130:a7dfa0ed966c trunk
[svn r134] Merged the DMD 1.024 frontend.
Added std.base64.
author | lindquist |
---|---|
date | Fri, 28 Dec 2007 23:52:40 +0100 |
parents | c53b6e3fe49a |
children | 5acec6b2eef8 |
line wrap: on
line diff
--- a/dmd/doc.c Fri Dec 28 22:55:24 2007 +0100 +++ b/dmd/doc.c Fri Dec 28 23:52:40 2007 +0100 @@ -269,7 +269,6 @@ } buf.printf("$(DDOC_COMMENT Generated by Ddoc from %s)\n", srcfile->toChars()); - if (isDocFile) { size_t commentlen = strlen((char *)comment); @@ -283,7 +282,6 @@ } else { - dc->writeSections(sc, this, sc->docbuf); emitMemberComments(sc); } @@ -654,6 +652,10 @@ buf->writestring("static "); if (d->isConst()) buf->writestring("const "); +#if V2 + if (d->isInvariant()) + buf->writestring("invariant "); +#endif if (d->isFinal()) buf->writestring("final "); if (d->isSynchronized()) @@ -663,7 +665,7 @@ void Declaration::toDocBuffer(OutBuffer *buf) { - //printf("Declaration::toDocbuffer() %s\n", toChars()); + //printf("Declaration::toDocbuffer() %s, originalType = %p\n", toChars(), originalType); if (ident) { prefix(buf, this); @@ -671,7 +673,12 @@ if (type) { HdrGenState hgs; hgs.ddoc = 1; - type->toCBuffer(buf, ident, &hgs); + if (originalType) + { //originalType->print(); + originalType->toCBuffer(buf, ident, &hgs); + } + else + type->toCBuffer(buf, ident, &hgs); } else buf->writestring(ident->toChars()); @@ -723,10 +730,11 @@ td->onemember == this) { HdrGenState hgs; unsigned o = buf->offset; + TypeFunction *tf = (TypeFunction *)type; hgs.ddoc = 1; prefix(buf, td); - type->next->toCBuffer(buf, NULL, &hgs); + tf->next->toCBuffer(buf, NULL, &hgs); buf->writeByte(' '); buf->writestring(ident->toChars()); buf->writeByte('('); @@ -738,7 +746,6 @@ tp->toCBuffer(buf, &hgs); } buf->writeByte(')'); - TypeFunction *tf = (TypeFunction *)type; Argument::argsToCBuffer(buf, &hgs, tf->parameters, tf->varargs); buf->writestring(";\n");