AstTyped** actual = sl->values;
StructMember smem;
+ b32 all_comptime = 1;
+
fori (i, 0, mem_count) {
if (check_expression(actual)) return 1;
return 1;
}
+ if (((*actual)->flags & Ast_Flag_Comptime) == 0)
+ all_comptime = 0;
+
actual++;
}
+ if (all_comptime)
+ sl->flags |= Ast_Flag_Comptime;
+
return 0;
}
break;
}
+ case Ast_Kind_Struct_Literal: {
+ AstStructLiteral* sl = (AstStructLiteral *) node;
+
+ Type* sl_type = sl->type;
+ assert(sl_type->kind == Type_Kind_Struct);
+
+ i32 i = 0;
+ bh_arr_each(AstTyped *, expr, sl->values) {
+ emit_raw_data(mod, bh_pointer_add(data, sl_type->Struct.memarr[i]->offset), *expr);
+ i++;
+ }
+
+ break;
+ }
+
case Ast_Kind_StrLit: {
AstStrLit* sl = (AstStrLit *) node;