yaml-rust
yaml-rust copied to clipboard
Scalar parser
This is a rebased version of https://github.com/chyh1990/yaml-rust/pull/37
In the last commit I replaced the ... inclusive patterns with ..= since it's getting deprecated in 2 weeks. It got stabilized in rust 1.26 in may 2018, but appveyor and travis are using rust 1.17 and 1.24.
I also started using dyn Trait, again because of the imminent deprecation of dyn-less traits.
If supporting such old compilers is a priority, the last commit should be skippable. I suppose we may want instead to explicitly allow the deprecated syntax.
I updated the tag directive-handling code to not rely on NLL (it uses an intermediate "Action" enum to separate the read-borrowing peek from the write-borrowing update), and it now compiles on rust 1.27.0 (because of dyn syntax) and runs tests on 1.28.0 (because of a slice::from_ref in regex-syntax).
I tested this with a naive rebase against upstream master ( 0ecbc23 ) this morning, it still passes all tests (there's a dead code warning). This functionality would be quite useful for me personally, but unfortunately I'm still rather new to rust so I'm unable to adequately review the code. I'd be willing to provide a bounty for successful merger with upstream and subsequent release of functionality in the next version of the upstream yaml-rust crate - 100 AUD in the currency of choice.
What would it take to push this forward?
If needed I would be willing to pick up where this left off
FWIW I've merged this PR into my fork: https://github.com/davvid/yaml-rust