Basic type conversion when assigning, added + - unary
This commit is contained in:
@@ -287,7 +287,7 @@ struct Ast_Package:Ast{
|
||||
function Ast_Atom *
|
||||
ast_str(Token *pos, Intern_String string){
|
||||
AST_NEW(Atom, VALUE, pos, AST_EXPR | AST_ATOM);
|
||||
result->type = type_string;
|
||||
result->type = untyped_string;
|
||||
result->intern_val = string;
|
||||
return result;
|
||||
}
|
||||
@@ -303,14 +303,14 @@ function Ast_Atom *
|
||||
ast_bool(Token *pos, B32 bool_val){
|
||||
AST_NEW(Atom, VALUE, pos, AST_EXPR | AST_ATOM);
|
||||
result->bool_val = bool_val;
|
||||
result->type = type_bool;
|
||||
result->type = untyped_bool;
|
||||
return result;
|
||||
}
|
||||
|
||||
function Ast_Atom *
|
||||
ast_float(Token *pos, F64 value){
|
||||
AST_NEW(Atom, VALUE, pos, AST_EXPR | AST_ATOM);
|
||||
result->type = type_f64;
|
||||
result->type = untyped_float;
|
||||
result->f64_val = value;
|
||||
return result;
|
||||
}
|
||||
@@ -318,7 +318,7 @@ ast_float(Token *pos, F64 value){
|
||||
function Ast_Atom *
|
||||
ast_int(Token *pos, S64 integer){
|
||||
AST_NEW(Atom, VALUE, pos, AST_EXPR | AST_ATOM);
|
||||
result->type = type_int;
|
||||
result->type = untyped_int;
|
||||
result->int_val = integer;
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user