tailhook / rust-quire

A YAML-based configuration library for Rust
https://docs.rs/quire/
Other
13 stars 5 forks source link

Support for merging multiple aliases #1

Closed anti-social closed 8 years ago

anti-social commented 8 years ago

http://yaml.org/type/merge.html specifies merging of multiple maps via aliases:


---
- &CENTER { x: 1, y: 2 }
- &BIG { r: 10 }

-
  << : [ *CENTER, *BIG ]

I tried to make a patch but I think it looks ugly: https://github.com/anti-social/rust-quire/commit/fc893d5bd0ed3df98fa2dd56bb9b64cbdf143b51

tailhook commented 8 years ago

Multiple aliases work, you just just need a space after an alias *CENTER , *BIG. Same thing with bracket at the end. I should look at the spec to find out the exact way this needs to be parsed.