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

fix up addition of ¦ and operators (#37973) #38100

Merged
merged 1 commit into from
Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Language changes
instead of `:call`.
* Instances of `UniformScaling` are no longer `isequal` to matrices. Previous
behaviour violated the rule that `isequal(x, y)` implies `hash(x) == hash(y)`.
* `⌿` (U+233F) and `¦` (U+00A6) are now infix operators with times-like and plus-like precedence,
respectively. Previously they were parsed as identifier characters ([#37973]).

Compiler/Runtime improvements
-----------------------------
Expand Down
4 changes: 3 additions & 1 deletion src/flisp/julia_extensions.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ static int is_wc_cat_id_start(uint32_t wc, utf8proc_category_t cat)
cat == UTF8PROC_CATEGORY_SC || // allow currency symbols
// other symbols, but not arrows or replacement characters
(cat == UTF8PROC_CATEGORY_SO && !(wc >= 0x2190 && wc <= 0x21FF) &&
wc != 0xfffc && wc != 0xfffd) ||
wc != 0xfffc && wc != 0xfffd &&
wc != 0x233f && // notslash
wc != 0x00a6) || // broken bar

// math symbol (category Sm) whitelist
(wc >= 0x2140 && wc <= 0x2a1c &&
Expand Down
3 changes: 3 additions & 0 deletions test/syntax.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2490,3 +2490,6 @@ end
in 1:3
end""")
end

# PR #37973
@test Meta.parse("1¦2⌿3") == Expr(:call, :¦, 1, Expr(:call, :⌿, 2, 3))