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

"when" keyword not listed as a keyword #9786

Closed
MajorGonzo opened this issue Aug 19, 2024 · 1 comment · Fixed by #9787
Closed

"when" keyword not listed as a keyword #9786

MajorGonzo opened this issue Aug 19, 2024 · 1 comment · Fixed by #9787

Comments

@MajorGonzo
Copy link
Contributor

MajorGonzo commented Aug 19, 2024

Godot 4.3

Just found out "when" is a keyword used in match statements (maybe elsewhere?). However, it's not listed on the basics page as a keyword. It's first listed a single time as an example on the match statement section (as far as I found), and then two times on the Patterns Guard section, which should perhaps be renamed Guard Expressions to match the example in match keyword section:

match <expression>:
...
<pattern(s)> when <guard expression>:
...

It should have an entry like "in" in the keyword section. Also, for beginners I think "guard expression" should link to the Patterns Guard/Guard Expressions section.

(https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_basics.html)

@tetrapod00
Copy link
Contributor

I agree with you that cross-links are desireable when possible. Unfortunately, that <guard expression> appears in a code block, so it can't link to a section. Everything after the "match" header is meant to be read in order, so I'm not too worried about leaving it unlinked.

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

Successfully merging a pull request may close this issue.

3 participants