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

Handle escapes #23

Merged
merged 3 commits into from
Jul 31, 2017
Merged

Handle escapes #23

merged 3 commits into from
Jul 31, 2017

Conversation

torkleyy
Copy link
Contributor

Well, I thought it is wrong and it turns out it is. Seems there are really many things you can get wrong when writing a config format.

* Serializer
   * Strings
   * Chars
* Deserializer
   * Chars
@@ -228,9 +230,24 @@ impl<'de, 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
fn deserialize_char<V>(self, visitor: V) -> Result<V::Value>
where V: Visitor<'de>
{
let parser = sym(b'\'') * take(1) - sym(b'\'');
let parser = sym(b'\'') * take(1);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is most likely a better way to do this with POM, but it didn't work for me and this is somehow easier to read. I wonder if there is a parser library that is fast and nice to read.

@kvark
Copy link
Collaborator

kvark commented Jul 31, 2017

Good stuff!
bors r+

bors bot added a commit that referenced this pull request Jul 31, 2017
23: Handle escapes r=kvark

Well, I thought it is wrong and it turns out it is. Seems there are really many things you can get wrong when writing a config format.
@bors
Copy link
Contributor

bors bot commented Jul 31, 2017

Build succeeded

@bors bors bot merged commit ee43a24 into ron-rs:master Jul 31, 2017
@torkleyy torkleyy deleted the escape branch July 31, 2017 15:13
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

Successfully merging this pull request may close these issues.

2 participants