Move types to Core_Ctx
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
with 2 allocators, and simplify stuff
|
||||
@! Cleanup big int allocator
|
||||
@! Replace iterator interface
|
||||
@! Errors and logs should be placed on the compiler context
|
||||
|
||||
@! Clean way to free all memory and reset the compiler
|
||||
@! Bring the Table<>
|
||||
@@ -135,10 +136,70 @@ size = 0
|
||||
for i in meta.token_simple_expr:
|
||||
if i[1] != "SPECIAL":
|
||||
size += 1
|
||||
print(f" Ast_Operator_Info op_info_table[{size}];")
|
||||
print(f"Ast_Operator_Info op_info_table[{size}];")
|
||||
*/
|
||||
Ast_Operator_Info op_info_table[20];
|
||||
Ast_Operator_Info op_info_table[20];
|
||||
/*END*/
|
||||
|
||||
Ast_Type type__void;
|
||||
Ast_Type type__string;
|
||||
Ast_Type type__bool;
|
||||
Ast_Type type__type;
|
||||
|
||||
Ast_Type type__f32;
|
||||
Ast_Type type__f64;
|
||||
|
||||
Ast_Type type__s8 ;
|
||||
Ast_Type type__s16;
|
||||
Ast_Type type__s32;
|
||||
Ast_Type type__s64;
|
||||
|
||||
Ast_Type type__u8 ;
|
||||
Ast_Type type__u16;
|
||||
Ast_Type type__u32;
|
||||
Ast_Type type__u64;
|
||||
|
||||
Ast_Type type__untyped_bool;
|
||||
Ast_Type type__untyped_int;
|
||||
Ast_Type type__untyped_string;
|
||||
Ast_Type type__untyped_float;
|
||||
|
||||
Ast_Type type__char;
|
||||
Ast_Type type__int;
|
||||
|
||||
Ast_Type *type_char = &type__char;
|
||||
Ast_Type *type_int = &type__int;
|
||||
Ast_Type *type_void = &type__void;
|
||||
|
||||
Ast_Type *type_pointer_to_char;
|
||||
Ast_Type *type_pointer_to_void;
|
||||
Ast_Type *type_any; // Needs to be inited at runtime
|
||||
|
||||
Ast_Type *type_type = &type__type;
|
||||
Ast_Type *type_string = &type__string;
|
||||
Ast_Type *type_bool = &type__bool;
|
||||
|
||||
Ast_Type *type_f32 = &type__f32;
|
||||
Ast_Type *type_f64 = &type__f64;
|
||||
|
||||
Ast_Type *type_s8 = &type__s8 ;
|
||||
Ast_Type *type_s16 = &type__s16;
|
||||
Ast_Type *type_s32 = &type__s32;
|
||||
Ast_Type *type_s64 = &type__s64;
|
||||
|
||||
Ast_Type *type_u8 = &type__u8 ;
|
||||
Ast_Type *type_u16 = &type__u16;
|
||||
Ast_Type *type_u32 = &type__u32;
|
||||
Ast_Type *type_u64 = &type__u64;
|
||||
|
||||
Ast_Type *untyped_string = &type__untyped_string;
|
||||
Ast_Type *untyped_bool = &type__untyped_bool;
|
||||
Ast_Type *untyped_int = &type__untyped_int;
|
||||
Ast_Type *untyped_float = &type__untyped_float;
|
||||
|
||||
|
||||
|
||||
|
||||
Intern_String intern(String string){
|
||||
assert(string.len > 0);
|
||||
return intern_string(&interns, string);
|
||||
|
||||
Reference in New Issue
Block a user