mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-18 20:02:22 -07:00
Add basic switch statement
Implement as naive if-else chain
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user