Skip to content

Commit a4d42c9

Browse files
pthariensflameIanButterworth
authored andcommitted
Add JuliaLang/JuliaSyntax.jl#525 to NEWS.md, flisp parser, and REPL (#57143)
Now that JuliaLang/JuliaSyntax.jl#525 has been merged, also add it to the flisp parser and REPL, and document it!
1 parent f090da8 commit a4d42c9

File tree

5 files changed

+18
-2
lines changed

5 files changed

+18
-2
lines changed

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ New language features
3030
`Threads.@spawn :samepool foo()` which is shorthand for `Threads.@spawn Threads.threadpool() foo()` ([#57109]).
3131
* The `@ccall` macro can now take a `gc_safe` argument, that if set to true allows the runtime to run garbage collection concurrently to the `ccall` ([#49933]).
3232
* A single method covering multiple functions is now allowed in more cases. See issue #54620. ([#58131]).
33+
* The character U+1F8B2 🢲 (RIGHTWARDS ARROW WITH LOWER HOOK), newly added by Unicode 16,
34+
is now a valid operator with arrow precedence, accessible as `\hookunderrightarrow` at the REPL.
35+
([JuliaLang/JuliaSyntax.jl#525], [#57143]).
3336

3437
Language changes
3538
----------------
@@ -290,6 +293,8 @@ Tooling Improvements
290293
[#57081]: https://github.com/JuliaLang/julia/issues/57081
291294
[#57087]: https://github.com/JuliaLang/julia/issues/57087
292295
[#57109]: https://github.com/JuliaLang/julia/issues/57109
296+
[#57143]: https://github.com/JuliaLang/julia/issues/57143
293297
[#57253]: https://github.com/JuliaLang/julia/issues/57253
294298
[#57727]: https://github.com/JuliaLang/julia/issues/57727
295299
[#58131]: https://github.com/JuliaLang/julia/issues/58131
300+
[JuliaLang/JuliaSyntax.jl#525]: https://github.com/JuliaLang/JuliaSyntax.jl/pull/525

src/flisp/julia_extensions.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ JL_DLLEXPORT int jl_id_start_char(uint32_t wc)
130130
return 1;
131131
if (wc < 0xA1 || wc > 0x10ffff)
132132
return 0;
133+
// "Rightwards Arrow with Lower Hook"
134+
if (wc == 0x1f8b2)
135+
return 1;
133136
return is_wc_cat_id_start(wc, utf8proc_category((utf8proc_int32_t) wc));
134137
}
135138

@@ -147,7 +150,9 @@ JL_DLLEXPORT int jl_id_char(uint32_t wc)
147150
cat == UTF8PROC_CATEGORY_SK || cat == UTF8PROC_CATEGORY_ME ||
148151
cat == UTF8PROC_CATEGORY_NO ||
149152
// primes (single, double, triple, their reverses, and quadruple)
150-
(wc >= 0x2032 && wc <= 0x2037) || (wc == 0x2057))
153+
(wc >= 0x2032 && wc <= 0x2037) || (wc == 0x2057) ||
154+
// "Rightwards Arrow with Lower Hook"
155+
wc == 0x1f8b2)
151156
return 1;
152157
return 0;
153158
}

src/julia-parser.scm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
;; comma - higher than assignment outside parentheses, lower when inside
1111
(define prec-pair (add-dots '(=>)))
1212
(define prec-conditional '(?))
13-
(define prec-arrow (add-dots '(← → ↔ ↚ ↛ ↞ ↠ ↢ ↣ ↦ ↤ ↮ ⇎ ⇍ ⇏ ⇐ ⇒ ⇔ ⇴ ⇶ ⇷ ⇸ ⇹ ⇺ ⇻ ⇼ ⇽ ⇾ ⇿ ⟵ ⟶ ⟷ ⟹ ⟺ ⟻ ⟼ ⟽ ⟾ ⟿ ⤀ ⤁ ⤂ ⤃ ⤄ ⤅ ⤆ ⤇ ⤌ ⤍ ⤎ ⤏ ⤐ ⤑ ⤔ ⤕ ⤖ ⤗ ⤘ ⤝ ⤞ ⤟ ⤠ ⥄ ⥅ ⥆ ⥇ ⥈ ⥊ ⥋ ⥎ ⥐ ⥒ ⥓ ⥖ ⥗ ⥚ ⥛ ⥞ ⥟ ⥢ ⥤ ⥦ ⥧ ⥨ ⥩ ⥪ ⥫ ⥬ ⥭ ⥰ ⧴ ⬱ ⬰ ⬲ ⬳ ⬴ ⬵ ⬶ ⬷ ⬸ ⬹ ⬺ ⬻ ⬼ ⬽ ⬾ ⬿ ⭀ ⭁ ⭂ ⭃ ⥷ ⭄ ⥺ ⭇ ⭈ ⭉ ⭊ ⭋ ⭌ ← → ⇜ ⇝ ↜ ↝ ↩ ↪ ↫ ↬ ↼ ↽ ⇀ ⇁ ⇄ ⇆ ⇇ ⇉ ⇋ ⇌ ⇚ ⇛ ⇠ ⇢ ↷ ↶ ↺ ↻ --> <-- <-->)))
13+
(define prec-arrow (add-dots '(← → ↔ ↚ ↛ ↞ ↠ ↢ ↣ ↦ ↤ ↮ ⇎ ⇍ ⇏ ⇐ ⇒ ⇔ ⇴ ⇶ ⇷ ⇸ ⇹ ⇺ ⇻ ⇼ ⇽ ⇾ ⇿ ⟵ ⟶ ⟷ ⟹ ⟺ ⟻ ⟼ ⟽ ⟾ ⟿ ⤀ ⤁ ⤂ ⤃ ⤄ ⤅ ⤆ ⤇ ⤌ ⤍ ⤎ ⤏ ⤐ ⤑ ⤔ ⤕ ⤖ ⤗ ⤘ ⤝ ⤞ ⤟ ⤠ ⥄ ⥅ ⥆ ⥇ ⥈ ⥊ ⥋ ⥎ ⥐ ⥒ ⥓ ⥖ ⥗ ⥚ ⥛ ⥞ ⥟ ⥢ ⥤ ⥦ ⥧ ⥨ ⥩ ⥪ ⥫ ⥬ ⥭ ⥰ ⧴ ⬱ ⬰ ⬲ ⬳ ⬴ ⬵ ⬶ ⬷ ⬸ ⬹ ⬺ ⬻ ⬼ ⬽ ⬾ ⬿ ⭀ ⭁ ⭂ ⭃ ⥷ ⭄ ⥺ ⭇ ⭈ ⭉ ⭊ ⭋ ⭌ ← → ⇜ ⇝ ↜ ↝ ↩ ↪ ↫ ↬ ↼ ↽ ⇀ ⇁ ⇄ ⇆ ⇇ ⇉ ⇋ ⇌ ⇚ ⇛ ⇠ ⇢ ↷ ↶ ↺ ↻ --> <-- <--> 🢲)))
1414
(define prec-lazy-or (add-dots '(|\|\||)))
1515
(define prec-lazy-and (add-dots '(&&)))
1616
(define prec-comparison

stdlib/REPL/src/latex_symbols.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ const latex_symbols = Dict(
517517
"\\mapsto" => "",
518518
"\\hookleftarrow" => "",
519519
"\\hookrightarrow" => "",
520+
"\\hookunderrightarrow" => "🢲",
520521
"\\looparrowleft" => "",
521522
"\\looparrowright" => "",
522523
"\\leftrightsquigarrow" => "",

test/syntax.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2282,6 +2282,11 @@ end
22822282
@test Meta.parse("a ⥷ b") == Expr(:call, :, :a, :b)
22832283
end
22842284

2285+
# issue 57143
2286+
@testset "binary 🢲" begin
2287+
@test Meta.parse("a 🢲 b") == Expr(:call, :🢲, :a, :b)
2288+
end
2289+
22852290
# only allow certain characters after interpolated vars (#25231)
22862291
@test_parseerror("\"\$x෴ \"",
22872292
"interpolated variable \$x ends with invalid character \"\"; use \"\$(x)\" instead.")

0 commit comments

Comments
 (0)