-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
allow unicode modifiers after ' #37247
Conversation
src/julia-parser.scm
Outdated
@@ -1241,7 +1241,18 @@ | |||
(if (ts:space? s) | |||
(error (string "space not allowed before \"" t "\""))) | |||
(take-token s) | |||
(loop (list t ex))) | |||
(let* ((port (ts:port s)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be handled in the lexer, by removing '
from the no-suffix list, then the parser test needs to be changed to use a SuffSet
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this cause any issues with character literals? Or is that handled differently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could use read-operator
directly for this though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be handled in the lexer, by removing ' from the no-suffix list, then the parser test needs to be changed to use a SuffSet.
When I remove ctrans-op
form the no-suffix list, 'ᵀ'
parses as (|'| |'ᵀ|)
, so there needs to be an additional argument to read-operator
when parsing a call chain vs when starting to parse a new atom.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, you're right.
cf76145
to
6763c5c
Compare
One thing to think about is whether |
That's a good point! I think it should return true, because to the user, it acts just like |
Should I just change the Julia function |
a90bde3
to
355a3da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than my comment I think this should be good to go.
355a3da
to
7592999
Compare
@JeffBezanson Sorry for bothering you, but would you be willing to take another look and merge if ok? |
Bump. 🙂 |
Looks good, just needs a rebase. |
7592999
to
4aa1d6b
Compare
Ok? |
There's also a bunch of issue links that are missing (JuliaLang#37410, JuliaLang#37247, JuliaLang#37540, JuliaLang#37973, JuliaLang#37461, JuliaLang#37753) but it seems there's a script that generates the links so I'm assuming that will be fixed automatically. Co-authored-by: Viral B. Shah <ViralBShah@users.noreply.github.com>
As discussed in the triage call, this is technically breaking because we currently parse
a'ᵀ
asa' * ᵀ
anda'ᵀb
asa' * ᵀb
, but it doesn't look like this is actually used in the wild. Still needs news.fixes #34507