Mercurial > projects > ldc
comparison dmd/attrib.c @ 876:27a379f288bf
Merged DMD 1.039
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Wed, 07 Jan 2009 19:34:48 +0100 |
parents | 330f999ade44 |
children | a8cb25d478c4 |
comparison
equal
deleted
inserted
replaced
875:330f999ade44 | 876:27a379f288bf |
---|---|
139 } | 139 } |
140 | 140 |
141 void AttribDeclaration::emitComment(Scope *sc) | 141 void AttribDeclaration::emitComment(Scope *sc) |
142 { | 142 { |
143 //printf("AttribDeclaration::emitComment(sc = %p)\n", sc); | 143 //printf("AttribDeclaration::emitComment(sc = %p)\n", sc); |
144 | |
145 /* If generating doc comment, skip this because if we're inside | |
146 * a template, then include(NULL, NULL) will fail. | |
147 */ | |
148 // if (sc->docbuf) | |
149 // return; | |
150 | 144 |
151 Array *d = include(NULL, NULL); | 145 Array *d = include(NULL, NULL); |
152 | 146 |
153 if (d) | 147 if (d) |
154 { | 148 { |
1198 //printf("ConditionalDeclaration::emitComment(sc = %p)\n", sc); | 1192 //printf("ConditionalDeclaration::emitComment(sc = %p)\n", sc); |
1199 if (condition->inc) | 1193 if (condition->inc) |
1200 { | 1194 { |
1201 AttribDeclaration::emitComment(sc); | 1195 AttribDeclaration::emitComment(sc); |
1202 } | 1196 } |
1197 else if (sc->docbuf) | |
1198 { | |
1199 /* If generating doc comment, be careful because if we're inside | |
1200 * a template, then include(NULL, NULL) will fail. | |
1201 */ | |
1202 Array *d = decl ? decl : elsedecl; | |
1203 for (unsigned i = 0; i < d->dim; i++) | |
1204 { Dsymbol *s = (Dsymbol *)d->data[i]; | |
1205 s->emitComment(sc); | |
1206 } | |
1207 } | |
1203 } | 1208 } |
1204 | 1209 |
1205 // Decide if 'then' or 'else' code should be included | 1210 // Decide if 'then' or 'else' code should be included |
1206 | 1211 |
1207 Array *ConditionalDeclaration::include(Scope *sc, ScopeDsymbol *sd) | 1212 Array *ConditionalDeclaration::include(Scope *sc, ScopeDsymbol *sd) |