Module relative pathing seems to work, managed to get out of having to have the exe where the files are,

Got rid of scope names, now unique names uses scope ids, module folder is in top folder
This commit is contained in:
Krzosa Karol
2022-06-27 10:56:17 +02:00
parent 15d452cae3
commit b4f38caabe
13 changed files with 46 additions and 40 deletions

75
modules/language.kl Normal file
View File

@@ -0,0 +1,75 @@
/*
String :: struct
str: *U8
len: S64
Slice :: struct
data: *void
len : S64
*/
Dynamic_Array :: struct
data: *void
len : S64
cap : S64
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_member_count: S64
struct_members: *Type_Info_Struct_Member
lambda_argument_count: S64
lambda_arguments: *Type_Info
lambda_return: Type
type_infos_len: S64 #foreign
type_infos : *Type_Info #foreign
get_type_info :: (type: Type): *Type_Info
id := type->S64
if id >= type_infos_len
return 0
return type_infos + id