Skip to content

Added consume_query #36

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

Closed
wants to merge 2 commits into from

Conversation

That3Percent
Copy link
Contributor

This PR adds a new API consume_query:

/// Parses a single ExecutableDefinition and returns an AST as well as the remainder of the input
pub fn consume_query<'a, S>(s: &'a str) -> Result<(Definition<'a, S>, &'a str), ParseError>
where
    S: Text<'a>,
{ .. }

There are 3 tests showing the functionality.

Resolves #35

I apologize ahead of time that rustfmt went to town on any file that I saved. If you prefer the original formatting or want to make all the formatting changes as a separate commit or something let me know what you need and I can re-make the changes (they aren't that complicated)

@That3Percent
Copy link
Contributor Author

Anything I can do to help get this merged?

@tailhook
Copy link
Collaborator

Sorry, for late reply. This PR is extremely hard to review. Please send your changes without reformatting everything (especially since rustfmt makes code worse here in few places at least).

@tailhook
Copy link
Collaborator

tailhook commented Nov 4, 2020

I like d2225bd. But we can probably at least set recursion limit on TokenStream object, so it's possible to override.

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.

Nom query
2 participants