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

feat: Add a or! macro to make or chaining more readable #427

Closed
wants to merge 1 commit into from

Conversation

Marwes
Copy link
Contributor

@Marwes Marwes commented Jan 29, 2020

There are some earlier discussions about more complicated macros (#26 and #395). But I believe a simple or! macro is quite useful on its own as it lets long .or chains be written without having the first filter being aligned differently or .or getting lost in the noise.

(Originally I called this choice! because of the equivalent macro I use in combine https://docs.rs/combine/4.0.1/combine/macro.choice.html but or! is probably more understandable. It could also be written as a function, using tuples to fake varargs https://docs.rs/combine/4.0.1/combine/fn.choice.html)

@Marwes Marwes closed this Jun 11, 2020
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.

None yet

1 participant