Skip to content

fix: handle hex escapes in strings and reject invalid escapes#358

Merged
blueloveTH merged 1 commit intopocketpy:mainfrom
attaulasad:fix-hex-escape-handling
Apr 8, 2025
Merged

fix: handle hex escapes in strings and reject invalid escapes#358
blueloveTH merged 1 commit intopocketpy:mainfrom
attaulasad:fix-hex-escape-handling

Conversation

@attaulasad
Copy link
Contributor

Fixes #331: Correctly handle \x escapes in string literals.

  • Encodes hex values as UTF-8 for strings, ensuring valid lengths.
  • Rejects invalid hex escapes (e.g., \xgg).

@blueloveTH blueloveTH merged commit 28f70cf into pocketpy:main Apr 8, 2025
12 checks passed
@blueloveTH
Copy link
Collaborator

I think your fix is valid! Thanks!

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.

[BUG] Handling of hex chars in string litterals

2 participants