Include missing sub- and superscripts in operator suffix list#60285
Conversation
848fc8e to
15bed56
Compare
|
This seems reasonable to me. |
|
Note that we'll also need to patch https://github.com/JuliaLang/JuliaSyntax.jl/blob/4a983f60eb8ef3d877bbeb7eac6d2ae3d98fa377/src/julia/tokenize.jl#L149-L150 — maybe you should submit a JuliaSyntax.jl patch first, actually, since that's where all of the syntax work is currently happening. |
Oh, good point! Will do. |
JuliaSyntax actually lives in this repo now (as of #59870), so the changes can be added directly to this PR |
That's surprising! Alright, I've made the change here. Thanks for pointing that out. |
@stevengj remarked in his original PR introducing this file that the Unicode superscripts and subscripts are annoyingly scattered all over the place — as evidenced by the fact that there are still a few good ones missing. Specifically, I was trying to use superscript alpha (
\^alpha<tab>), which fails.There are many Unicode entries with "subscript" or "superscript" in the name — not all of which need to be included in the list, but I think it would be fair to include all characters that are available in Julia with tab completion starting with either
\_or\^. The currentsrc/flisp/julia_opsuffs.hfile is just 6 short of that goal. Three of the missing are inarguably mistaken omissions: superscript alpha ᵅ, epsilon ᵋ, and (Latin) phi ᶲ. We also have subscript < ˱ and > ˲, which also seem like natural fits on a list that also include subscript = ₌, ( ₍, and ) ₎. The last candidate is subscript schwa ₔ, which is borderline since it's not really a math-y character; on the other hand, making that the only intentional omission is the kind of thing that would really bug me if I were the poor jerk who wanted it. But I won't die on that hill.