Fix compile errors when compiling for msvc

This commit is contained in:
Krzosa Karol
2022-05-26 16:55:07 +02:00
parent c88b38cc44
commit 3cd79040bc
6 changed files with 48 additions and 32 deletions

View File

@@ -222,13 +222,15 @@ function Operand
eval_expr(Ast_Expr *ast, Ast_Resolved_Type *expected_type){
switch(ast->kind){
Ast_Begin(AST_INT, Ast_Atom){
Operand result = {type_int, true, {.int_val=(S64)node->int_val}};
Operand result = {type_int, true};
result.int_val = node->int_val;
return result;
Ast_End();
}
Ast_Begin(AST_STR, Ast_Atom){
Operand result = {type_string, true, {.intern_val = node->intern_val}};
Operand result = {type_string, true};
result.intern_val = node->intern_val;
return result;
Ast_End();
}