cyanskies / another-toml-cpp

MIT License
1 stars 0 forks source link

Support writing dotted keys #1

Closed cyanskies closed 1 year ago

cyanskies commented 1 year ago

Add an new enum to writer:

enum class table_type
{
    header,
    dotted
}

Add a optional table_type parameter to writer::begin_table() to indicate that the table should be represented by dotted key names, rather than a table header: writer::begin_table(std::string_view name, table_type = table_type::header)

Tables are already recorded in the backend as headered or dotted by the parser using the table_def enum.

The writer stream operator needs to be updated to support writing the tables with dotted notation.

cyanskies commented 1 year ago

Done in 958a9c5de4cb6ffdbb0dcd9ddc88eec696343e4c