Skip to content

warn for unicode escapes that are too long#1042

Merged
lsf37 merged 3 commits intomasterfrom
warning
Jan 21, 2023
Merged

warn for unicode escapes that are too long#1042
lsf37 merged 3 commits intomasterfrom
warning

Conversation

@lsf37
Copy link
Member

@lsf37 lsf37 commented Jan 20, 2023

\u with more than 4 or \U with more than 6 hex digits previously were silently split into the legal 4 or 6 unicode escape, followed by normal character matches. Usually these occurrences are errors, but there may be specifications that rely on this behaviour, so instead of an error we produce a warning that can be suppressed.

Fixes #183

\u with more than 4 or \U with more than 6 hex digits previously were
silently split into the legal 4 or 6 unicode escape, followed by normal
character matches. Usually these occurrences are errors, but there may
be specifications that rely on this behaviour, so instead of an error
we produce a warning that can be suppressed.

Fixes #183
@lsf37 lsf37 self-assigned this Jan 20, 2023
@lsf37 lsf37 added the enhancement Feature requests label Jan 20, 2023
@lsf37 lsf37 added this to the 1.9.0 milestone Jan 20, 2023
lsf37 added 2 commits January 21, 2023 11:31
After previous refactorings unicodeProperties can be null in
LexScan.flex. Initialise to default if no unicode directive has been
encountered yet.
@lsf37 lsf37 merged commit 2c828ba into master Jan 21, 2023
@lsf37 lsf37 deleted the warning branch January 21, 2023 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Feature requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warn for probably wrong unicode escapes such as \u0ffff

1 participant