67 case ast::NodeType::Constructor: {
69 return scope->lookup_class(*table, ctor.
identifier()).unwrap(err);
71 case ast::NodeType::FuncCall: {
78 return scope->lookup_class(*table, var.identifier()).unwrap(err);
110 if (param_count <= 0 || param_count > 4) {
113 else if (param_count == 4) {
126 return {table->float4_cls,
131 return {table->int4_cls,
136 return {table->uint4_cls,
141 return {table->bool4_cls,
146 else if (param_count == 3) {
157 return {table->float3_cls,
161 return {table->int3_cls,
165 return {table->uint3_cls,
169 return {table->bool3_cls,
173 else if (param_count == 2) {
183 return {table->float2_cls,
187 return {table->int2_cls,
191 return {table->uint2_cls,
195 return {table->bool2_cls,
200 return {table->make_type(table->bool_cls, res1.
type->
comp_len),
204 return {table->make_type(table->bool_cls, res1.
type->
comp_len),
208 return {table->make_type(table->bool_cls, res1.
type->
comp_len),
212 return {table->make_type(table->bool_cls, res1.
type->
comp_len),
216 return {table->make_type(table->bool_cls, res1.
type->
comp_len),
220 return {table->make_type(table->bool_cls, res1.
type->
comp_len),
225 else if (param_count == 1) {
230 else if (res.
type == table->float4_cls || res.
type == table->int4_cls ||
231 res.
type == table->bool4_cls || res.
type == table->uint4_cls)
246 else if (res.
type == table->float3_cls || res.
type == table->int3_cls ||
247 res.
type == table->bool3_cls || res.
type == table->uint3_cls)
262 else if (res.
type == table->float2_cls || res.
type == table->int2_cls ||
263 res.
type == table->bool2_cls || res.
type == table->uint2_cls)
278 else if (res.
type == table->float_cls || res.
type == table->int_cls ||
279 res.
type == table->bool_cls || res.
type == table->uint_cls)
330 return {table->uint_cls,
334 return {table->int_cls,
338 return {table->float_cls,
342 return {table->float_cls,
350 case ast::NodeType::LocalVar: {
357 return table->err_cls;
361 return table->err_cls;
811 err = {
node, diag, msg, msg2, msg3};
819 error(err->node, err->diag, err->param1, err->param2, err->param3);