Rename #partial[Enum]Type to #sparse[Enum]Type for non-contiguous enum fields

This commit is contained in:
gingerBill
2022-02-05 13:01:15 +00:00
parent 1553137c23
commit 97be867103
7 changed files with 22 additions and 8 deletions

View File

@@ -95,6 +95,7 @@ Type_Info_Enumerated_Array :: struct {
count: int,
min_value: Type_Info_Enum_Value,
max_value: Type_Info_Enum_Value,
is_sparse: bool,
}
Type_Info_Dynamic_Array :: struct {elem: ^Type_Info, elem_size: int}
Type_Info_Slice :: struct {elem: ^Type_Info, elem_size: int}

View File

@@ -260,6 +260,9 @@ print_type :: proc "contextless" (ti: ^Type_Info) {
print_type(info.elem)
case Type_Info_Enumerated_Array:
if info.is_sparse {
print_string("#sparse")
}
print_byte('[')
print_type(info.index)
print_byte(']')