Skip to content
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

GDScript: Be more lenient with identifiers #72975

Merged
merged 1 commit into from
Feb 9, 2023

Conversation

vnen
Copy link
Member

@vnen vnen commented Feb 9, 2023

  • Allow identifiers similar to keywords if they are in ASCII range.
  • Allow constants to be treated as regular identifiers.
  • Allow keywords that can be used as identifiers in expressions.

- Allow identifiers similar to keywords if they are in ASCII range.
- Allow constants to be treated as regular identifiers.
- Allow keywords that can be used as identifiers in expressions.
@vnen vnen added this to the 4.0 milestone Feb 9, 2023
@vnen vnen requested a review from a team as a code owner February 9, 2023 14:30
@vnen
Copy link
Member Author

vnen commented Feb 9, 2023

BTW this an addendum to #71676, in particular when checking for visual similarities between identifiers and keywords (which is a hard error). With this PR it allows similarities if the identifier only has ASCII, avoiding cases such as P1 being confused with PI (and other less likely possibilities like self and seIf). Usually the font distinguish those well enough.

@akien-mga akien-mga merged commit 6fca54a into godotengine:master Feb 9, 2023
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants