Add basic switch statement

Implement as naive if-else chain
This commit is contained in:
gingerBill
2023-07-19 13:37:56 +01:00
parent 533f6a552c
commit 73f25ed182
2 changed files with 131 additions and 0 deletions
+3
View File
@@ -123,3 +123,6 @@ gb_internal cgValue cg_const_value(cgProcedure *p, Type *type, ExactValue const
gb_internal cgValue cg_const_int(cgProcedure *p, Type *type, i64 i) {
return cg_const_value(p, type, exact_value_i64(i));
}
gb_internal cgValue cg_const_bool(cgProcedure *p, Type *type, bool v) {
return cg_value(tb_inst_bool(p->func, v), type);
}