28 lines
593 B
Odin
28 lines
593 B
Odin
package store
|
|
|
|
// Ini Reflection code
|
|
|
|
import "core:mem"
|
|
import "core:reflect"
|
|
import "core:encoding/ini"
|
|
import "core:encoding/json"
|
|
|
|
Ini_Unmarshal_Error :: union {
|
|
mem.Allocator_Error,
|
|
}
|
|
|
|
ini_unmarshal :: proc(data: string, v: ^$T, allocator := context.allocator) -> Ini_Unmarshal_Error {
|
|
m := ini.load_map_from_string(data, allocator) or_return
|
|
defer ini.delete_map(m)
|
|
|
|
fields := reflect.struct_fields_zipped(T)
|
|
|
|
for field in fields {
|
|
|
|
}
|
|
}
|
|
|
|
ini_bool_default :: proc(field: reflect.Struct_Field) {
|
|
val, ok := reflect.struct_tag_lookup(field.tag, "ini")
|
|
}
|