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

Raise SyntaxError on invalid UTF8 strings in lexer/tokenizer #1905

Merged
merged 2 commits into from
Feb 13, 2025

Conversation

catlee
Copy link
Contributor

@catlee catlee commented Jan 30, 2025

No description provided.

@catlee catlee requested a review from karreiro January 30, 2025 16:50
@catlee catlee self-assigned this Jan 30, 2025
Copy link
Contributor

@karreiro karreiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this PR, @catlee! I believe this change is in the right direction.

Part of me feels we should raise the error with the Unexpected character message, to be cohesive with the raise_syntax_error method. But, given we were raising an ArgumentError, I believe it's fine to have a more specific message for this.

Thanks again for this PR!

@catlee catlee force-pushed the catlee/invalid_utf8 branch from f99a495 to 550135c Compare February 11, 2025 19:24
@catlee catlee marked this pull request as ready for review February 11, 2025 19:47
@catlee catlee requested a review from karreiro February 11, 2025 19:47
Copy link
Contributor

@karreiro karreiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @catlee!

@catlee catlee merged commit da4afd4 into main Feb 13, 2025
13 checks passed
@catlee catlee deleted the catlee/invalid_utf8 branch February 13, 2025 14:24
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.

2 participants