[qfcc] Add named types to algebra subtypes

I'm uncertain about the names, but this makes it much easier to get at
specific subtypes (eg, PGA.tvec as a type) rather than having to know
the group mask.
This commit is contained in:
Bill Currie 2023-09-11 00:29:56 +09:00
parent d387b56f60
commit 2d7b5c18af

View file

@ -426,6 +426,12 @@ algebra_subtype (type_t *type, attribute_t *attr)
}
return algebra_mvec_type (algebra, mask);
}
auto symtab = algebra->mvec_sym->type->t.symtab;
auto field = symtab_lookup (symtab, attr->name);
if (field) {
return field->type;
}
error (0, "invalid subtype %s", attr->name);
return type;
}