Skip to content

Commit 690517a

Browse files
parse unicode forall and exists as identifiers (#42314)
Co-authored-by: Steven G. Johnson <[email protected]>
1 parent f985b47 commit 690517a

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

NEWS.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ New language features
1212
to enforce the involved function calls to be (or not to be) inlined. ([#41312])
1313
* The default behavior of observing `@inbounds` declarations is now an option via `auto` in `--check-bounds=yes|no|auto` ([#41551])
1414
* New function `eachsplit(str)` for iteratively performing `split(str)`.
15+
* ``, ``, and `` are now allowed as identifier characters ([#42314]).
1516

1617
Language changes
1718
----------------

src/flisp/julia_extensions.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,10 @@ static int is_wc_cat_id_start(uint32_t wc, utf8proc_category_t cat)
8282
wc == 0x223f || wc == 0x22be || wc == 0x22bf || // ∿, ⊾, ⊿
8383
wc == 0x22a4 || wc == 0x22a5 || // ⊤ ⊥
8484

85-
(wc >= 0x2202 && wc <= 0x2233 &&
85+
(wc >= 0x2200 && wc <= 0x2233 &&
8686
(wc == 0x2202 || wc == 0x2205 || wc == 0x2206 || // ∂, ∅, ∆
8787
wc == 0x2207 || wc == 0x220e || wc == 0x220f || // ∇, ∎, ∏
88+
wc == 0x2200 || wc == 0x2203 || wc == 0x2204 || // ∀, ∃, ∄
8889
wc == 0x2210 || wc == 0x2211 || // ∐, ∑
8990
wc == 0x221e || wc == 0x221f || // ∞, ∟
9091
wc >= 0x222b)) || // ∫, ∬, ∭, ∮, ∯, ∰, ∱, ∲, ∳

test/syntax.jl

+6
Original file line numberDiff line numberDiff line change
@@ -2967,6 +2967,12 @@ end
29672967
@generated g25678(x) = return :x
29682968
@test g25678(7) === 7
29692969

2970+
# issue #19012
2971+
@test Meta.parse("\U2200", raise=false) == Symbol("")
2972+
@test Meta.parse("\U2203", raise=false) == Symbol("")
2973+
@test Meta.parse("a\U2203", raise=false) == Symbol("a∃")
2974+
@test Meta.parse("\U2204", raise=false) == Symbol("")
2975+
29702976
# issue 42220
29712977
macro m42220()
29722978
return quote

0 commit comments

Comments
 (0)