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

port sequence combinators to the new design #899

Closed
Geal opened this issue Apr 6, 2019 · 4 comments
Closed

port sequence combinators to the new design #899

Geal opened this issue Apr 6, 2019 · 4 comments
Milestone

Comments

@Geal
Copy link
Collaborator

Geal commented Apr 6, 2019

for most cases this is not too useful since we can just write a parser function in imperative style, but applying a tuple of parsers in order could still be interesting. The code is in src/sequence/macros.rs. To rewrite:

  • tuple
  • do_parse: is it necessary?
@Geal Geal added this to the 5.0 milestone Apr 6, 2019
@Geal Geal mentioned this issue Apr 6, 2019
22 tasks
@Evelyn-H
Copy link

Evelyn-H commented Apr 8, 2019

My two cents; I feel like keeping the number of macros/combinators to a minimum would be a good thing. One of the things that made it harder for me to get used to the library initially was the vast amount of macros that all looked very similar at a first glance. Though this might already be better if there's better documentation in 5.0.

Edit: Maybe separating things out to different (sub)crates might be a good idea?

@Geal
Copy link
Collaborator Author

Geal commented Apr 9, 2019

I want to remove a few combinators, and I'll separate functions in more modules. A big issue with macros was that they are all at the top level, so we often have to look them up in alphabetical order. functions can have a more coherent organization.

@Geal
Copy link
Collaborator Author

Geal commented Apr 9, 2019

the methods combinators and whitespace combinators will move out in other crates, I don't know yet about others

@Geal
Copy link
Collaborator Author

Geal commented Apr 27, 2019

all the sequence combinators are now ported to functions. the tuple combinator stays in macro form, but there is a function version

@Geal Geal closed this as completed Apr 27, 2019
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