miker2 / flexi_config_reader

A flexible configuration format that supports templated tables and referencing of existing keys.
MIT License
3 stars 1 forks source link

Support key "override" syntax #134

Closed michael-projectx closed 5 months ago

michael-projectx commented 5 months ago

General idea:

Specifying [override] for a key means that the same key must exist somewhere else in the config. These must be treated as special values. An [override] key can exist once and only once.

Probably the best way to achieve this is to pull them out of the main data structure while parsing the config and into a special "override" structure.

This will make it easier to check that these keys actually override a value instead of being in-addition-to what is specified.

michael-projectx commented 5 months ago

Implemented by https://github.com/miker2/flexi_config_reader/pull/135