Add floats
This commit is contained in:
@@ -295,6 +295,14 @@ ast_ident(Token *pos, Intern_String string){
|
||||
return result;
|
||||
}
|
||||
|
||||
function Ast_Atom *
|
||||
ast_float(Token *pos, F64 value){
|
||||
AST_NEW(Atom, VALUE, pos, AST_EXPR | AST_ATOM);
|
||||
result->type = type_f64; // @todo untyped
|
||||
result->f64_val = value;
|
||||
return result;
|
||||
}
|
||||
|
||||
function Ast_Atom *
|
||||
ast_int(Token *pos, S64 integer){
|
||||
AST_NEW(Atom, VALUE, pos, AST_EXPR | AST_ATOM);
|
||||
|
||||
Reference in New Issue
Block a user