-
Notifications
You must be signed in to change notification settings - Fork 0
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 True
/False
/None
in grammar?
#1268
Labels
Comments
lars-reimann
added a commit
that referenced
this issue
Nov 24, 2024
Closes #1268 ### Summary of Changes * Improve default error message of the linker. * Add a default resolution to the message that might solve the issue (check spelling and imports). * Add special resolutions, if users likely used Python keywords instead of Safe-DS keywords by accident (e.g. `True` instead of `true`).
lars-reimann
pushed a commit
that referenced
this issue
Nov 24, 2024
## [0.22.0](v0.21.1...v0.22.0) (2024-11-24) ### Features * categorize API elements ([#1263](#1263)) ([d0d971e](d0d971e)), closes [#1243](#1243) * disable inlay hints for assignee types by default ([#1260](#1260)) ([a651ade](a651ade)) * improve error messages from linker ([#1272](#1272)) ([eddd868](eddd868)), closes [#1268](#1268) * output statement ([#1262](#1262)) ([011ba31](011ba31)), closes [#1259](#1259) * remove schema concept from grammar ([#1273](#1273)) ([1a3bf80](1a3bf80)), closes [#1133](#1133)
🎉 This issue has been resolved in version 0.22.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem?
Unlike in Python, all our keywords are lowercase, including
true
,false
, andnull
. Users who come from Python may accidentally useTrue
,False
, andNone
instead, which leads to lexer errors.Desired solution
We may allow the Python keywords in the grammar, but forbid them using validation checks.
Possible alternatives (optional)
True
,False
, andNone
are parsed as a reference in an expression context. We may instead change the scoping error message if these references cannot be resolved.Screenshots (optional)
No response
Additional Context (optional)
The downside is that
True
,False
, andNone
would become reserved keywords in the language. Since uppercase names only occur in stubs, though, it should not be a major deal.The text was updated successfully, but these errors were encountered: