Skip to content

fix(lexers): recognize repeated Java Unicode escape markers - #1478

Merged
github-actions[bot] merged 1 commit into
alecthomas:masterfrom
yxshee:codex/chroma-java-unicode-marker
Nov 10, 2026
Merged

github-actions[bot] merged 1 commit into
alecthomas:masterfrom
yxshee:codex/chroma-java-unicode-marker

Conversation

@yxshee

@yxshee yxshee commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Multiple u's can be used when escaping Unicode characters in Java. The lexer emits errors when it treats these as character literals.

char value = '\uu0061';
if (value != 'a') throw new AssertionError();
char maximum = '\uuuuFFFF';

Can just use what we have for one marker and treat it the same as it does currently with decoded quotes, backslashes and new lines.

New fixture errors out on base and succeeds with patch.

Found Error token

All 576 compiled Java cases and 288 Markdown/CQL embedding cases succeed. The 25 controls and 643 corpus cases remain the same. bin/bit -f test bin/bit -f lint bin/bit -f check-generated and go test -count=1 ./... all succeed.

@github-actions
github-actions Bot enabled auto-merge (squash) November 10, 2026 14:39
@github-actions
github-actions Bot merged commit 8af8a72 into alecthomas:master Nov 10, 2026
4 checks passed
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.

1 participant