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

Lists fail to parse if first line is a comment #113

Closed michael-projectx closed 1 week ago

michael-projectx commented 1 year ago

The following won't parse properly:

foo = [
  # Comment
  "one",
  "two",
  "three"
]
miker2 commented 1 year ago

Comments should be allowed within lists in general. PEGTL provides a rule for lists with padded separators.

We may want our own custom rule so that comments can come after a comma, but not before

Something like:

list<R, pad<",", blank, COMMENT>>

miker2 commented 1 year ago

See also issue #114

miker2 commented 1 year ago

See also issue #125

michael-projectx commented 1 week ago

Completed by PR #127