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

Docs for Parser::parse and Parser::parse_complete do not note any difference #1801

Open
shahn opened this issue Jan 27, 2025 · 1 comment
Open

Comments

@shahn
Copy link

shahn commented Jan 27, 2025

A parser takes in input type, and returns a Result containing either the remaining input and the output value, or an error

is the docstring for both. Is this the high-level switch between streaming and complete parsers, or should this be done some other way? Should I use parse_complete everywhere if I want a complete parser, or is it enough to use it once? I am not really sure how that fits together.

@Geal
Copy link
Collaborator

Geal commented Jan 29, 2025

thank you for the report, I'll update the docs. If you are using the function based parsers, use parse_complete where you want the complete parser. If the entire parser stack has migrated to the new combinators returning impl Parser, then you only need to call it once

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