-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add wide & unicode string literal support #527
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on these! The invalid
token is now almost exclusively used for incorrectly encoded bytes.
Would you mind taking a look at the remaining cases? I think some of them can simply be marked unreachable thanks to line splicing and the others could be changed to empty_char_literal
and unterminated_{char,string}_literal
with better error messages.
The split between CharKind
and StringKind
with nearly identical APIs seems a bit odd to me but if you think it's better then it's fine.
I think the only reason I made them separate is to prevent string and char literals from concatenating but you're right, they can probably be combined. I'll take a look at that and the |
Add a test to ensure string literals can't be concatenated with char literals.
This better reflects that it now handles character literals and string literals
Adds support for
L""
/u""
/U""
literals.String contents are written to
p.retained_strings
Also fixes 2 unrelated bugs: