mirror of
https://github.com/odin-lang/Odin.git
synced 2026-05-05 12:34:47 +00:00
Rename #partial[Enum]Type to #sparse[Enum]Type for non-contiguous enum fields
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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(']')
|
||||
|
||||
Reference in New Issue
Block a user