10 srch(Type *t, char *s)
16 if(strcmp(t->tag->name, s) == 0) {
17 if(f == 0 || t->depth < f->depth)
26 odot(Node *n, Node *r)
35 fatal("dodot: no tag");
39 error("no type specified for (expr).%s", s);
42 error("pointer must be integer for (expr).%s", s);
44 t = srch(res.comt, s);
46 error("no tag for (expr).%s", s);
50 r->comt = t->type->lt;
52 addr = res.ival+t->offset;
60 indir(cormap, addr, t->fmt, r);
68 buildtype(Node *m, int d)
77 buildtype(m->left, d);
78 buildtype(m->right, d);
82 buildtype(m->left, d+1);
85 t = malloc(sizeof(Type));
92 t->type = m->left->sym;
98 t->type = m->right->sym;
108 defcomplex(Node *tn, Node *m)
125 error("%s is not a complex type", type->name);
138 for(f = l->sym->local; f; f = f->next) {
139 if(f->var == l->left->sym) {
140 f->type = n->sym->lt;
144 f = malloc(sizeof(Frtype));
146 fatal("out of memory");
150 f->var = l->left->sym;
151 f->next = l->sym->local;