Skip to content

Conversation

@moble
Copy link
Contributor

@moble moble commented Dec 1, 2025

@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 current src/flisp/julia_opsuffs.h file 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.

@moble moble force-pushed the extend_julia_opsuffs branch from 848fc8e to 15bed56 Compare December 1, 2025 15:12
@stevengj stevengj added parser Language parsing and surface syntax needs news A NEWS entry is required for this change labels Dec 1, 2025
@stevengj
Copy link
Member

stevengj commented Dec 1, 2025

This seems reasonable to me.

@stevengj
Copy link
Member

stevengj commented Dec 1, 2025

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.

@moble
Copy link
Contributor Author

moble commented Dec 1, 2025

Note that we'll also need to patch JuliaLang/JuliaSyntax.jl@4a983f6/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.

@topolarity
Copy link
Member

maybe you should submit a JuliaSyntax.jl patch first

JuliaSyntax actually lives in this repo now (as of #59870), so the changes can be added directly to this PR

@moble
Copy link
Contributor Author

moble commented Dec 3, 2025

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.

@topolarity topolarity requested a review from stevengj December 3, 2025 21:08
@stevengj stevengj removed the needs news A NEWS entry is required for this change label Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parser Language parsing and surface syntax

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants