Compiling with new untyped system
This commit is contained in:
19
new_ast.cpp
19
new_ast.cpp
@@ -141,22 +141,13 @@ Ast_Resolved_Type *type; \
|
||||
union{ \
|
||||
bool bool_val; \
|
||||
F64 f64_val; \
|
||||
F32 f32_val; \
|
||||
S8 s8_val; \
|
||||
S16 s16_val; \
|
||||
S32 s32_val; \
|
||||
S64 s64_val; \
|
||||
U8 u8_val; \
|
||||
U16 u16_val; \
|
||||
U32 u32_val; \
|
||||
U64 u64_val; \
|
||||
S64 int_val; \
|
||||
U64 uint_val; \
|
||||
Intern_String intern_val; \
|
||||
Intern_String intern_val;\
|
||||
BigInt big_int_val;\
|
||||
Ast_Resolved_Type *type_val; \
|
||||
};
|
||||
#define INLINE_VALUE_FIELDS union{Value value; struct{VALUE_FIELDS};}
|
||||
struct Value{VALUE_FIELDS};
|
||||
// BigInt big_int_val;
|
||||
|
||||
struct Ast_Atom: Ast_Expr{
|
||||
INLINE_VALUE_FIELDS;
|
||||
@@ -326,11 +317,9 @@ ast_float(Token *pos, F64 value){
|
||||
|
||||
function Ast_Atom *
|
||||
ast_int(Token *pos, U64 integer){
|
||||
assert(integer <= S64MAX);
|
||||
AST_NEW(Atom, VALUE, pos, AST_EXPR | AST_ATOM);
|
||||
result->type = untyped_int;
|
||||
result->int_val = integer;
|
||||
// result->big_int = big_int(pctx->perm, integer); // @todo: int arena??
|
||||
bigint_init_unsigned(&result->big_int_val, integer);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user