-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Implement parsing Unicode names #9
base: main
Are you sure you want to change the base?
Conversation
This would close #6, right? |
Yeah, that's the idea |
I think it might be a little cleaner to have a new feature |
I think it may be more future-proof to force the name to be quoted (alternative A. in OP), as suggested in #2 (comment). |
@emilyyyylime are you still willing to work on this PR, or should we close it for now? |
Yeah, I can implement the feature name and quoting + resolve conflicts |
This is locked behind an optional build dependency to avoid incurring the cost of
unicode_names2
to every downstream package. (It really is much heavier than it needs to be 😅)To reiterate; this PR does not amount to any extra build time or dependencies for downstream packages (unless they explicitly opt in to the
unicode_names2
feature.)The current syntax consist of simply appending the name after the U+XXXX literal, some alternatives that were discussed:
///
or//!
)Also as the code is implemented currently, explicit names cannot be added after verbatim characters. This was mostly an arbitrary choice and might be rethought if we decide on implementing one of the other syntax options above.
Another area with some room to behave differently is this being a build dependency, rather than a dev-dependency. This was done because writing the verification as a separate test would require reimplementation of the parsing code from the ground up (dev-dependencies are only available inside tests/benchmarking code).
Example output for bad names: