Refresh the repo
This commit is contained in:
60
modules/Language.core
Normal file
60
modules/Language.core
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
Any :: struct
|
||||
data: *void
|
||||
type: Type
|
||||
|
||||
Type_Info_Kind :: enum
|
||||
S64 // FIRST_NUMERIC
|
||||
S32
|
||||
S16
|
||||
S8
|
||||
INT
|
||||
CHAR
|
||||
U64
|
||||
U32
|
||||
U16
|
||||
U8
|
||||
F32
|
||||
F64
|
||||
POINTER
|
||||
BOOL // LAST_NUMERIC
|
||||
STRING
|
||||
VOID
|
||||
ARRAY
|
||||
LAMBDA
|
||||
STRUCT
|
||||
UNION
|
||||
ENUM
|
||||
TYPE
|
||||
SLICE
|
||||
TUPLE
|
||||
|
||||
Type_Info_Struct_Member :: struct
|
||||
name: String
|
||||
type: Type
|
||||
offset: S64
|
||||
|
||||
Type_Info :: struct
|
||||
kind: Type_Info_Kind
|
||||
size: S64
|
||||
align: S64
|
||||
is_unsigned: bool
|
||||
type: Type
|
||||
|
||||
base_type: Type
|
||||
array_size: S64
|
||||
struct_members: *Type_Info_Struct_Member
|
||||
struct_member_count: S64
|
||||
lambda_arguments: *Type_Info
|
||||
lambda_argument_count: S64
|
||||
lambda_return: Type
|
||||
|
||||
type_infos_len: S64 #foreign
|
||||
type_infos : *Type_Info #foreign
|
||||
|
||||
GetTypeInfo :: (type: Type): *Type_Info
|
||||
id := type->S64
|
||||
if id >= type_infos_len
|
||||
return 0
|
||||
return type_infos + id
|
||||
*/
|
||||
Reference in New Issue
Block a user