Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error parsing vdf with empty item #1

Open
CosmicHorrorDev opened this issue Feb 20, 2021 · 2 comments
Open

Error parsing vdf with empty item #1

CosmicHorrorDev opened this issue Feb 20, 2021 · 2 comments

Comments

@CosmicHorrorDev
Copy link

Hello! I was trying to poke through the code to fix the issue myself and send a PR, but all the macro magic of old nom was really hurting my brain. Long story short steamy-vdf fails to parse

"key"    ""

and returns a parse error. If "" actually contains text then it works fine.

I think this is a problem in vdf/src/parser.rs's enclosed parser where super::enclosed(b"\"\"") returns Error(Position(Alt, [34, 34])) when I think it should return Done(&b""[..], Token::Item("".into())).

Let me know if there's any way I can help, or if this crate isn't supported anymore!

@striezel
Copy link

PR #3 may possibly fix that problem.

@CosmicHorrorDev
Copy link
Author

Thanks for submitting a PR!

Just to let you know I made a separate parser and serde library for VDF since this parser didn't seem to be maintained. Specifically keyvalues-parser and keyvalues-serde

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants