Implement vector and quaternion component access.

This commit is contained in:
Bill Currie 2011-03-07 10:02:20 +09:00
parent f0e47f2334
commit 0b3d0011c5

View file

@ -931,11 +931,8 @@ field_expr (expr_t *e1, expr_t *e2)
e->e.expr.type = pointer_type (ivar->type); e->e.expr.type = pointer_type (ivar->type);
return unary_expr ('.', e); return unary_expr ('.', e);
} }
} else if (t1->type == ev_vector) { } else if (t1->type == ev_vector || t1->type == ev_quat
} else if (t1->type == ev_quat) { || is_struct (t1)) {
} else if (is_struct (t1)) {
symtab_t *strct = t1->t.symtab;
symbol_t *sym = e2->e.symbol;//FIXME need to check
symbol_t *field; symbol_t *field;
field = get_struct_field (t1, e1, e2); field = get_struct_field (t1, e1, e2);