fix: allow ⱼ in identifiers (#6679)

This PR changes the identifier parser to allow for the ⱼ unicode
character which was forgotten as it lives by itself in a codeblock with
coptic characters.
This commit is contained in:
Henrik Böving 2025-01-21 04:51:51 +01:00 committed by GitHub
parent 16bd7ea455
commit 8375d00d8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 1 deletions

View file

@ -93,7 +93,8 @@ def isLetterLike (c : Char) : Bool :=
def isSubScriptAlnum (c : Char) : Bool :=
isNumericSubscript c ||
(0x2090 ≤ c.val && c.val ≤ 0x209c) ||
(0x1d62 ≤ c.val && c.val ≤ 0x1d6a)
(0x1d62 ≤ c.val && c.val ≤ 0x1d6a) ||
c.val == 0x2c7c
@[inline] def isIdFirst (c : Char) : Bool :=
c.isAlpha || c = '_' || isLetterLike c

View file

@ -0,0 +1,18 @@
-- test that we accept all unicode subscripts
def fₐ : Nat := 0
def fₑ : Nat := 0
def fₕ : Nat := 0
def fᵢ : Nat := 0
def fⱼ : Nat := 0
def fₖ : Nat := 0
def fₗ : Nat := 0
def fₘ : Nat := 0
def fₙ : Nat := 0
def fₒ : Nat := 0
def fₚ : Nat := 0
def fᵣ : Nat := 0
def fₛ : Nat := 0
def fₜ : Nat := 0
def fᵤ : Nat := 0
def fᵥ : Nat := 0
def fₓ : Nat := 0