Commit graph

19 commits

Author SHA1 Message Date
Daniel Eklöf
5ace4d77c7 yml: handle root's node being NULL 2019-04-29 18:49:44 +02:00
Daniel Eklöf
6622616ec7 yml: post-process: root's node may be NULL (empty configuration) 2019-04-29 18:47:46 +02:00
Daniel Eklöf
d922bc572f yml: add line/column info to every node 2019-01-11 23:20:06 +01:00
Daniel Eklöf
f0cc0b4383 yml: initialize return value, fixes gcc warning (-O3 -Wall) 2019-01-07 18:26:29 +01:00
Daniel Eklöf
aa38063e37 wip: verify configuration
We now verify the configuration (currently down to module level, but
not including particles) that are present are of the expected type.
2019-01-06 20:04:01 +01:00
Daniel Eklöf
cba97a0e65 yml: remove commented out (old) code 2019-01-02 12:32:19 +01:00
Daniel Eklöf
2977af835c yml: add TODO to handle duplicate keys when merging dictionaries 2019-01-02 12:14:23 +01:00
Daniel Eklöf
91fa8a0217 yml: cleanup 2019-01-02 12:09:42 +01:00
Daniel Eklöf
305058deab yml: detect (and report to user) duplicate keys in dictionaries 2019-01-02 12:08:41 +01:00
Daniel Eklöf
b13305526a yml: apparently, libyaml's line number in the error context is 0 based
Which makes zero sense when reporting the error to the user.
2019-01-01 23:27:54 +01:00
Daniel Eklöf
5abd825137 yml: yml_load(): optionally allocates an error string (on error) 2019-01-01 23:25:36 +01:00
Daniel Eklöf
3dc7d0e39d yml: yml_destroy(): return immediately if node is NULL
This can happen for example when destroying a partially created
dictionary entry, where only the key node has been created.
2019-01-01 23:24:27 +01:00
Daniel Eklöf
9351d3b6d9 yml: yml_value_as_bool(): return false if value didn't match any known values 2019-01-01 20:32:12 +01:00
Daniel Eklöf
b2082e38ed yml: support multiple merge values
This adds support for merging multiple values, using a list of
dictionaries:

    foo:
      <<: [*foo, *bar]
2018-12-29 16:06:04 +01:00
Daniel Eklöf
0e3dd72313 yml: bump anchor vector size 2018-12-26 15:31:37 +01:00
Daniel Eklöf
f1f3190767 yml: don't print out final node(s) 2018-12-17 20:26:02 +01:00
Daniel Eklöf
40e6af2e2e yml: use tllists to represent dictionaries and lists 2018-12-15 12:52:12 +01:00
Daniel Eklöf
4e2f578518 yml: implement alias and '<<' expansion 2018-12-13 19:05:52 +01:00
Daniel Eklöf
8bf8a398b9 initial commit: wip 2018-11-17 11:30:33 +01:00