Skip to content

Reverse tree access, recursive tree merging

Compare
Choose a tag to compare
@Galaco Galaco released this 24 Dec 17:45
· 19 commits to master since this release
  • Added parent link to KeyValue nodes.
  • Add new function to KeyValue struct; MergeInto() (see below)

A KeyValue can now be merged with another KeyValue. The entire tree of A will be merged with B, resulting in a tree that contains all nodes in A and B.
If a key appears in both A and B, A will replace B assuming they have the same Type, unless they both have child nodes, in which case they will be recursively merged. Merge will fail if there are mismatched types on nodes that appear in both A and B.