Adding Unary [-] [+] to new type system
This commit is contained in:
@@ -76,7 +76,7 @@ gen_expr(Ast_Expr *ast){
|
||||
if(is_int(node->type)) gen("%lld", node->int_val);
|
||||
else if(is_string(node->type)) gen("LIT(\"%s\")", node->intern_val.str);
|
||||
else if(is_bool(node->type)) node->bool_val ? gen("true"):gen("false");
|
||||
else if(node->type == type_f32) gen("%f", node->f32_val);
|
||||
else if(is_f32(node->type)) gen("%f", node->f32_val);
|
||||
else if(is_float(node->type)) gen("%f", node->f64_val);
|
||||
else invalid_codepath;
|
||||
BREAK();
|
||||
|
||||
Reference in New Issue
Block a user