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

Handle non-ascii names / options in from_usage(). #670

Merged
merged 4 commits into from
Oct 4, 2016

Conversation

tormol
Copy link
Contributor

@tormol tormol commented Sep 27, 2016

Closes #664 and should make it faster too.

Why aren't the stop_at functions written like c != a && c != b?

@yo-bot
Copy link

yo-bot commented Sep 27, 2016

Thanks for the pull request, and welcome! The team is excited to review your changes, and you should hear from @kbknapp (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@kbknapp
Copy link
Member

kbknapp commented Sep 27, 2016

Thanks for the PR! I'm out of town right now, so it may be a day or so before I can fully review this, but I'm excited for this! I'll let you know if I have any questions or changes 😉

@kbknapp
Copy link
Member

kbknapp commented Sep 28, 2016

@tormol looks great! Only thing I'd like to add is some tests for non-ASCII in shorts/longs and value names. Should be good to merge after that 👍

This should also speeds up the parser (except maybe for short options).
Multi-codepoint characters still can't be used as short options, but people shouldn't non-ASCII options nyway.

Closes clap-rs#664
….map(|(_,&v)| v)

In many cases this makes the assert fit on one line, but the double references are a bit awkward.
@tormol tormol force-pushed the parse_nonascii_usage branch from e3426d6 to fd4c087 Compare September 30, 2016 15:30
@tormol
Copy link
Contributor Author

tormol commented Sep 30, 2016

Getting options to work turned out to require more changes.
I also did some refactoring.

The current nightly has an issue that might be fixed tomorrow.

@tormol tormol closed this Oct 4, 2016
@tormol tormol reopened this Oct 4, 2016
@kbknapp
Copy link
Member

kbknapp commented Oct 4, 2016

Excellent! Thanks again for all the work! @homu r+

@homu
Copy link
Contributor

homu commented Oct 4, 2016

📌 Commit fd4c087 has been approved by kbknapp

homu added a commit that referenced this pull request Oct 4, 2016
Handle non-ascii names / options in from_usage().

Closes #664 and should make it faster too.

Why aren't the stop_at functions written like `c != a && c != b`?
@homu
Copy link
Contributor

homu commented Oct 4, 2016

⚡ Test exempted - status

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.

4 participants