Skip to content

fix(lexers/tlaplus): support Unicode TLA+ syntax - #1494

Merged
github-actions[bot] merged 1 commit into
alecthomas:masterfrom
martynovs:tlaplus-unicode
Nov 17, 2026
Merged

github-actions[bot] merged 1 commit into
alecthomas:masterfrom
martynovs:tlaplus-unicode

Conversation

@martynovs

Copy link
Copy Markdown
Contributor

Follow-up to #1493. The TLA+ lexer only knew the ASCII spellings plus part of the Unicode set, so Unicode specs (as written by tools such as tlauc) lost highlighting on the rest.

This covers every symbol in tlauc's tla-unicode.csv, which comes from the TLA+ standard's ASCII-to-Unicode table:

  • ≜ is now treated like ==, so Foo ≜ ... and M ≜ INSTANCE ... mark the defined name
  • ⟨ ⟩ are punctuation like << >>
  • arrows and temporal operators: → ← ↦ ↝ □ ◇ ⇔ ⇸
  • turnstiles, dots and the rest: ⊢ ⊣ ⫤ ‖ ‥ … ‼ ⁇ ⁺ ∷ ≔ ⩴, plus ∖
  • ℕ ℤ ℝ as builtins

New test lexers/testdata/tlaplus/unicode.* exercises them; a check over its recorded output shows no non-ASCII symbol left as plain Text. go test ./lexers passes.

🤖 Generated with Claude Code

Handle the symbols of the TLA+ ASCII-to-Unicode table (tlauc's
tla-unicode.csv): the definition sign, angle brackets, arrows, temporal
operators, turnstiles, dots and the number-set letters. Definitions
written with the Unicode definition sign are now recognised like ==.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions
github-actions Bot enabled auto-merge (squash) November 17, 2026 00:05
@github-actions
github-actions Bot merged commit 4adeb91 into alecthomas:master Nov 17, 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