Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse unicode forall and exists as identifiers #42314

Merged
Next Next commit
parse unicode forall and exists as identifiers
  • Loading branch information
willow-ahrens committed Sep 19, 2021
commit 5b2985a15bd87ed58731c503453a4d303b45aba6
1 change: 1 addition & 0 deletions src/flisp/julia_extensions.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ static int is_wc_cat_id_start(uint32_t wc, utf8proc_category_t cat)
wc == 0x223f || wc == 0x22be || wc == 0x22bf || // ∿, ⊾, ⊿
wc == 0x22a4 || wc == 0x22a5 || // ⊤ ⊥

wc == 0x2200 || wc == 0x2203 || // ∀, ∃
(wc >= 0x2202 && wc <= 0x2233 &&
(wc == 0x2202 || wc == 0x2205 || wc == 0x2206 || // ∂, ∅, ∆
wc == 0x2207 || wc == 0x220e || wc == 0x220f || // ∇, ∎, ∏
Expand Down
5 changes: 5 additions & 0 deletions test/syntax.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2966,3 +2966,8 @@ end

@generated g25678(x) = return :x
@test g25678(7) === 7

# issue #19012
@test Meta.parse("\U2200", raise=false) == Symbol("∀")
@test Meta.parse("\U2203", raise=false) == Symbol("∃")
@test Meta.parse("a\U2203", raise=false) == Symbol("a∃")