Closed Patitotective closed 2 years ago
Or simply turn TomlTable
into OrderedTable[string, TomlValueRef]
fixed by #45.
You can use -d:tomlOrderedTable
to switch TomlTable into OrderedTable
when parsing.
But because elements ordering is not mandated and even not not guaranteed by the spec, ordered table only supported by reader/parser/decoder. The writer/encoder cannot support full toml spec if using ordered table. there are cases related to dotted key where it's simply too hard or almost impossible to implement an ordered top level elements because dotted keys original form is destroyed during parsing, and when the generalized form of table is serialized, it will create different structure than the original document.
Thank you for the quick implementation. :upside_down_face:
I'm using this library to parse a TOML file where I describe some tables that will later become graphical elements, it will be cool if there were some
TomlKind.OrderedTable
orTomlFlag.TomlOrderedTable
so the elements look in the order you defined them.