-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Reserved words in julia-parser.scm #29197
Comments
mutable, abstract, and primitive are not reserved; they're only special when followed by I think |
Thanks for explanation. The only ambiguity I would guess it introduces is:
but it is handled correctly. I will add |
@mbauman Regarding your I think it would be good to document what @JeffBezanson put down in this issue as it is not obvious but I am not sure what would be the best place for it (probably somewhere around https://docs.julialang.org/en/latest/base/base/#Keywords-1). |
The brief intermittent doc tag was just a bad prior on my part: I assumed the change must be documentation because surely Yeah, it seems like that Keywords section could use just a brief introduction about what those words all are. |
OK - I will try to add an appropriate section as I have seen this question popping up. |
Just to clarify, it's worth noting that the parser doesn't actually need a list of all the "reserved" words in one place, since they don't all have the same parsing. We also need to distinguish words that are fully reserved and can't be used as variable names, from those that are mostly free to use but have some special syntax associated with them. |
Understood (hopefully 😄). I have tried to capture documentation of this distinction in #29229. |
There seem to be the following reserved words missing in julia-parser.scm:
mutable
,abstract
,primitive
ininitial-reserved-keywords
;elseif
,type
,where
inreserved-words
.Maybe it is intentional and I am not sure how relevant this is and if I have classified them correctly.
However, the source says in todo comment that the list should be completed so I am reporting this.
The text was updated successfully, but these errors were encountered: