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

Fix handling of empty and multi-byte character literals #2214

Merged
merged 1 commit into from
Sep 6, 2017

Conversation

mfelsche
Copy link
Contributor

@mfelsche mfelsche commented Sep 5, 2017

This PR will treat empty character literals as invalid syntax
and handle weird utf8 character literals like '🎠' correctly.

The root cause was the casting from char to int which created ints like 0xFFFFFF9F for a lexer char \x9F. This was treated as negative and thus ignored by the lexer.

This fixes #2198 in that it treats multi-byte input correctly byte by byte.

@Praetonus
Copy link
Member

Thank you!

The build failure looks unrelated, I've restarted it for good measure.

@Praetonus Praetonus added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Sep 5, 2017
@jemc jemc changed the title Fix handling of empty and utf8 character literals Fix handling of empty and multi-byte character literals Sep 5, 2017
@SeanTAllen SeanTAllen merged commit 219d54e into ponylang:master Sep 6, 2017
ponylang-main added a commit that referenced this pull request Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Character literal quirks
3 participants