-
Notifications
You must be signed in to change notification settings - Fork 9
Implement forwarding visitors for Option<V> #184
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I like this better than mine, I think. Please take a look at the places where I added Option returns and maybe only implement for those. I don't think that it is necessary to have this for an ItemListVisitor, for example.
IIUC all of the ones I've added so far are necessary. Please take a look and let me know what you think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind updating the tests that I wrote to include Some
/None
as appropriate. I think that you can cherry-pick from #185 for the test changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thanks!
Going forward I wonder if we should also try implementing some helpers for the most common uses for parsing. For example, when parsing a dictionary, get the value of an item named x
that is expected to be of type string, and (optionally) its parameter y
which should be an integer.
I'd be happy to consider that once we get some more feedback, though it would also be worth investigating a |
Fixes #183