diff options
| author | gingerBill <bill@gingerbill.org> | 2022-02-05 13:01:15 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-02-05 13:01:15 +0000 |
| commit | 97be86710306702a672309b23fbe8d38f1e6eeec (patch) | |
| tree | b8794b78149da6ec960250a1597073c6f7ec250f /core/runtime | |
| parent | 1553137c2365c3980488a6455fd83f0fcb9e28ca (diff) | |
Rename `#partial[Enum]Type` to `#sparse[Enum]Type` for non-contiguous enum fields
Diffstat (limited to 'core/runtime')
| -rw-r--r-- | core/runtime/core.odin | 1 | ||||
| -rw-r--r-- | core/runtime/print.odin | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/core/runtime/core.odin b/core/runtime/core.odin index 424650828..35144473b 100644 --- a/core/runtime/core.odin +++ b/core/runtime/core.odin @@ -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} diff --git a/core/runtime/print.odin b/core/runtime/print.odin index 8c0b65864..06740bc75 100644 --- a/core/runtime/print.odin +++ b/core/runtime/print.odin @@ -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(']') |