// Section name appends to a "prefix" which is made up of the previous structs.
if prefix {
section_head := fmt.aprintf("%s%v%s", c.value, Options.Symbols.NestedSection, value.value)
strings.write_string(§ions, section_head)
new_value := fmt.aprintf("%s%v%s", c.value, Options.Symbols.NestedSection, value.value)
delete(value.value)
// TODO(hrs) directly modifying the values means post-serialisation values will be different... If you serialise twice you'll get double the nesting.
// Perhaps "prefix" could be a string of previous nesting? Override it for each new section/nested section.
value.value = new_value
delete(section_head)
} else {
strings.write_string(§ions, value.value)
}
Directly modifying the section's value is a bad idea. This means serialising more than once will lead to repeated identifier names.
Directly modifying the section's value is a bad idea. This means serialising more than once will lead to repeated identifier names.