for (i = 0; i < type->structure.nfields; i++)
if (text_cmp(type->structure.fields[i].name, field) == 0)
return i;
for (i = 0; i < type->structure.nfields; i++)
if (text_cmp(type->structure.fields[i].name, field) == 0)
return i;
else if (st->init != structure_init)
type_err(c, "error: field reference attempted on %1, not a struct",
f->left, st, 0, NULL);
else if (st->init != structure_init)
type_err(c, "error: field reference attempted on %1, not a struct",
f->left, st, 0, NULL);
f->index = find_struct_index(st, f->name);
if (f->index < 0)
type_err(c, "error: cannot find requested field in %1",
f->index = find_struct_index(st, f->name);
if (f->index < 0)
type_err(c, "error: cannot find requested field in %1",