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

Consider supporting trailing commas within a list #114

Open michael-projectx opened 1 year ago

michael-projectx commented 1 year ago

Sometimes it's convenient to be able to comment out the last line in a list, which leads to parse errors due to the trailing comma. For example:

foo = [
  "bar",
  "baz",
  "buz"
]

Is valid, but if the last line is commented out, e.g.:

foo = [
  "bar",
  "baz",
  # "buz"
]

Then a parse error occurs due to the trailing comma.