// Workaround for missing Parameter instance for variadic params. (it's unnecessary to instantiate one).
bool isCVariadicParameter(Dsymbols *a, const utf8_t *p, size_t len)
{
- for (size_t i = 0; i < a->dim; i++)
+ for (size_t i = 0; i < a->length; i++)
{
TypeFunction *tf = isTypeFunction((*a)[i]);
if (tf && tf->varargs == 1 && cmp("...", p, len) == 0)
TypeFunction *tf = isTypeFunction(s);
if (tf && tf->parameters)
{
- for (size_t k = 0; k < tf->parameters->dim; k++)
+ for (size_t k = 0; k < tf->parameters->length; k++)
{
Parameter *fparam = (*tf->parameters)[k];
if (fparam->ident && cmp(fparam->ident->toChars(), p, len) == 0)
*/
static Parameter *isEponymousFunctionParameter(Dsymbols *a, const utf8_t *p, size_t len)
{
- for (size_t i = 0; i < a->dim; i++)
+ for (size_t i = 0; i < a->length; i++)
{
TemplateDeclaration *td = (*a)[i]->isTemplateDeclaration();
if (td && td->onemember)
global.params.ddocfiles->shift(p);
// Override with the ddoc macro files from the command line
- for (size_t i = 0; i < global.params.ddocfiles->dim; i++)
+ for (size_t i = 0; i < global.params.ddocfiles->length; i++)
{
FileName f((*global.params.ddocfiles)[i]);
File file(&f);
tm->tempdecl->isTemplateDeclaration() : NULL;
if (td && td->members)
{
- for (size_t i = 0; i < td->members->dim; i++)
+ for (size_t i = 0; i < td->members->length; i++)
{
Dsymbol *sm = (*td->members)[i];
TemplateMixin *tmc = sm->isTemplateMixin();
sc = sc->push(sds);
- for (size_t i = 0; i < sds->members->dim; i++)
+ for (size_t i = 0; i < sds->members->length; i++)
{
Dsymbol *s = (*sds->members)[i];
//printf("\ts = '%s'\n", s->toChars());
{
// Put the declaration signatures as the document 'title'
buf->writestring(ddoc_decl_s);
- for (size_t i = 0; i < dc->a.dim; i++)
+ for (size_t i = 0; i < dc->a.length; i++)
{
Dsymbol *sx = dc->a[i];
return;
if (ed->isAnonymous() && ed->members)
{
- for (size_t i = 0; i < ed->members->dim; i++)
+ for (size_t i = 0; i < ed->members->length; i++)
{
Dsymbol *s = (*ed->members)[i];
emitComment(s, buf, sc);
if (d)
{
- for (size_t i = 0; i < d->dim; i++)
+ for (size_t i = 0; i < d->length; i++)
{
Dsymbol *s = (*d)[i];
//printf("AttribDeclaration::emitComment %s\n", s->toChars());
* a template, then include(NULL, NULL) will fail.
*/
Dsymbols *d = cd->decl ? cd->decl : cd->elsedecl;
- for (size_t i = 0; i < d->dim; i++)
+ for (size_t i = 0; i < d->length; i++)
{
Dsymbol *s = (*d)[i];
emitComment(s, buf, sc);
if (d->isVarDeclaration() && td)
{
buf->writeByte('(');
- if (td->origParameters && td->origParameters->dim)
+ if (td->origParameters && td->origParameters->length)
{
- for (size_t i = 0; i < td->origParameters->dim; i++)
+ for (size_t i = 0; i < td->origParameters->length; i++)
{
if (i)
buf->writestring(", ");
buf->printf("%s %s", cd->kind(), cd->toChars());
}
int any = 0;
- for (size_t i = 0; i < cd->baseclasses->dim; i++)
+ for (size_t i = 0; i < cd->baseclasses->length; i++)
{
BaseClass *bc = (*cd->baseclasses)[i];
dc->parseSections(comment);
- for (size_t i = 0; i < dc->sections.dim; i++)
+ for (size_t i = 0; i < dc->sections.length; i++)
{
Section *sec = dc->sections[i];
void DocComment::writeSections(Scope *sc, Dsymbols *a, OutBuffer *buf)
{
- assert(a->dim);
+ assert(a->length);
//printf("DocComment::writeSections()\n");
Loc loc = (*a)[0]->loc;
buf->writestring("$(DDOC_SECTIONS ");
size_t offset2 = buf->offset;
- for (size_t i = 0; i < sections.dim; i++)
+ for (size_t i = 0; i < sections.length; i++)
{
Section *sec = sections[i];
if (sec->nooutput)
sec->write(loc, this, sc, a, buf);
}
- for (size_t i = 0; i < a->dim; i++)
+ for (size_t i = 0; i < a->length; i++)
{
Dsymbol *s = (*a)[i];
if (Dsymbol *td = getEponymousParent(s))
void Section::write(Loc loc, DocComment *, Scope *sc, Dsymbols *a, OutBuffer *buf)
{
- assert(a->dim);
+ assert(a->length);
if (namelen)
{
void ParamSection::write(Loc loc, DocComment *, Scope *sc, Dsymbols *a, OutBuffer *buf)
{
- assert(a->dim);
+ assert(a->length);
Dsymbol *s = (*a)[0]; // test
const utf8_t *p = body;
goto L1; // write out last one
buf->writestring(")\n");
- TypeFunction *tf = a->dim == 1 ? isTypeFunction(s) : NULL;
+ TypeFunction *tf = a->length == 1 ? isTypeFunction(s) : NULL;
if (tf)
{
- size_t pcount = (tf->parameters ? tf->parameters->dim : 0) + (int)(tf->varargs == 1);
+ size_t pcount = (tf->parameters ? tf->parameters->length : 0) + (int)(tf->varargs == 1);
if (pcount != paramcount)
{
warning(s->loc, "Ddoc: parameter count mismatch");
bool isIdentifier(Dsymbols *a, const utf8_t *p, size_t len)
{
- for (size_t i = 0; i < a->dim; i++)
+ for (size_t i = 0; i < a->length; i++)
{
const char *s = (*a)[i]->ident->toChars();
if (cmp(s, p, len) == 0)
Parameter *isFunctionParameter(Dsymbols *a, const utf8_t *p, size_t len)
{
- for (size_t i = 0; i < a->dim; i++)
+ for (size_t i = 0; i < a->length; i++)
{
Parameter *fparam = isFunctionParameter((*a)[i], p, len);
if (fparam)
TemplateParameter *isTemplateParameter(Dsymbols *a, const utf8_t *p, size_t len)
{
- for (size_t i = 0; i < a->dim; i++)
+ for (size_t i = 0; i < a->length; i++)
{
TemplateDeclaration *td = (*a)[i]->isTemplateDeclaration();
// Check for the parent, if the current symbol is not a template declaration.
td = getEponymousParent((*a)[i]);
if (td && td->origParameters)
{
- for (size_t k = 0; k < td->origParameters->dim; k++)
+ for (size_t k = 0; k < td->origParameters->length; k++)
{
TemplateParameter *tp = (*td->origParameters)[k];
if (tp->ident && cmp(tp->ident->toChars(), p, len) == 0)
void highlightText(Scope *sc, Dsymbols *a, OutBuffer *buf, size_t offset)
{
- Dsymbol *s = a->dim ? (*a)[0] : NULL; // test
+ Dsymbol *s = a->length ? (*a)[0] : NULL; // test
//printf("highlightText()\n");