mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-01 20:28:15 +00:00
Enumerated arrays [Enum_Type]Elem_Type
This commit is contained in:
@@ -79,6 +79,14 @@ Type_Info_Array :: struct {
|
||||
elem_size: int,
|
||||
count: int,
|
||||
};
|
||||
Type_Info_Enumerated_Array :: struct {
|
||||
elem: ^Type_Info,
|
||||
index: ^Type_Info,
|
||||
elem_size: int,
|
||||
count: int,
|
||||
min_value: Type_Info_Enum_Value,
|
||||
max_value: Type_Info_Enum_Value,
|
||||
};
|
||||
Type_Info_Dynamic_Array :: struct {elem: ^Type_Info, elem_size: int};
|
||||
Type_Info_Slice :: struct {elem: ^Type_Info, elem_size: int};
|
||||
Type_Info_Tuple :: struct { // Only really used for procedures
|
||||
@@ -156,6 +164,7 @@ Type_Info :: struct {
|
||||
Type_Info_Pointer,
|
||||
Type_Info_Procedure,
|
||||
Type_Info_Array,
|
||||
Type_Info_Enumerated_Array,
|
||||
Type_Info_Dynamic_Array,
|
||||
Type_Info_Slice,
|
||||
Type_Info_Tuple,
|
||||
|
||||
@@ -172,6 +172,14 @@ print_type :: proc(fd: os.Handle, ti: ^Type_Info) {
|
||||
print_u64(fd, u64(info.count));
|
||||
os.write_byte(fd, ']');
|
||||
print_type(fd, info.elem);
|
||||
|
||||
case Type_Info_Enumerated_Array:
|
||||
os.write_byte(fd, '[');
|
||||
print_type(fd, info.index);
|
||||
os.write_byte(fd, ']');
|
||||
print_type(fd, info.elem);
|
||||
|
||||
|
||||
case Type_Info_Dynamic_Array:
|
||||
os.write_string(fd, "[dynamic]");
|
||||
print_type(fd, info.elem);
|
||||
|
||||
Reference in New Issue
Block a user