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

Add support for referencing a proto without defining a substitution variable #92

Closed michael-projectx closed 1 year ago

michael-projectx commented 1 year ago

Currently something like:

proto my_proto {
  foo = "bar"
  var = 1
}

reference my_proto as my_struct {
}

will fail. The current workaround is to add +dummy = 0 or something similar within the curly braces of the reference.

An alternative would be to add an explicit keyword that allows to "copy" or "duplicate" a specific struct that has already been defined.