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(args): allow peeking arguments #121

Merged
merged 5 commits into from
Jan 2, 2021
Merged

Conversation

Alcremie
Copy link
Contributor

Introduces Args#peekWith and Args#peek (alongside their Result variants), allowing arguments to be peeked without advancing the parser's state. Args#peekWith accepts a callback that returns the value from either pickResult, repeatResult, or restResult, saving the state before running the callback and restoring it afterwards; Args#peek is a convenience method for peeking a single argument.

@lgtm-com
Copy link

lgtm-com bot commented Dec 25, 2020

This pull request introduces 1 alert when merging f449e1e into 10c7a1b - view on LGTM.com

new alerts:

  • 1 for Unreachable method overloads

@lgtm-com
Copy link

lgtm-com bot commented Dec 25, 2020

This pull request introduces 1 alert when merging e555294 into 10c7a1b - view on LGTM.com

new alerts:

  • 1 for Unreachable method overloads

@Alcremie
Copy link
Contributor Author

I'll have to defer to anyone who knows better about the overloading for the unreachable overload warning and how to best address it.

@lgtm-com
Copy link

lgtm-com bot commented Dec 25, 2020

This pull request introduces 1 alert when merging a772c84 into 10c7a1b - view on LGTM.com

new alerts:

  • 1 for Unreachable method overloads

@Alcremie
Copy link
Contributor Author

Consolidated peekWith and peek per kyra's request; this is ready for review.

@favna favna changed the title feat(Args): Allow peeking arguments feat(args): allow peeking arguments Jan 2, 2021
@favna favna merged commit 4786d48 into sapphiredev:main Jan 2, 2021
@Alcremie Alcremie deleted the args-peek branch January 3, 2021 06:15
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.

3 participants