[qfcc] Add an @construct type function

I decided to not mess with actual casts. In retrospect, this is probably
for the best as it avoids any bit-cast conflicts, but should allow for
block initializers with a few tweaks. `@construct (type, args...)` in
Ruamoko follows the same path as `type(args...)` in glsl.
This commit is contained in:
Bill Currie 2024-12-11 13:54:11 +09:00
parent 6840a208b9
commit 36c0b45bab
6 changed files with 19 additions and 14 deletions

View file

@ -287,7 +287,7 @@ math_constructor (const type_t *type, const expr_t *params, const expr_t *e)
const expr_t *
constructor_expr (const expr_t *e, const expr_t *params)
{
auto type = e->symbol->type;
auto type = e->typ.type;
if (is_algebra (type)) {
return error (e, "algebra not implemented");
}