yaml-rust icon indicating copy to clipboard operation
yaml-rust copied to clipboard

Scalar parser

Open gyscos opened this issue 6 years ago • 6 comments

This is a rebased version of https://github.com/chyh1990/yaml-rust/pull/37

gyscos avatar Aug 06 '19 23:08 gyscos

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.

gyscos avatar Aug 06 '19 23:08 gyscos

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).

gyscos avatar Aug 07 '19 18:08 gyscos

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.

jaesharp avatar Oct 01 '19 02:10 jaesharp

What would it take to push this forward?

softprops avatar Jun 05 '20 07:06 softprops

If needed I would be willing to pick up where this left off

softprops avatar Jun 05 '20 07:06 softprops

FWIW I've merged this PR into my fork: https://github.com/davvid/yaml-rust

davvid avatar Jan 29 '24 02:01 davvid