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:
parent
16bd7ea455
commit
8375d00d8c
2 changed files with 20 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
18
tests/lean/run/subscript_parser.lean
Normal file
18
tests/lean/run/subscript_parser.lean
Normal 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
|
||||
Loading…
Add table
Reference in a new issue