A key can be specified as an override using the following syntax: key [override] = 123
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.
General idea:
override
using the following syntax:key [override] = 123
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.