godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.7k stars 3.03k forks source link

GDScript Ampersand & StringName not in grammar documentation #9602

Open m21-cerutti opened 1 month ago

m21-cerutti commented 1 month ago

Your Godot version: 4.3

Issue description: Seems in grammar there isn't a rule to detect ampersand with string (stringName), to detect something like:

if event.is_action_pressed(&"click"):

versus

if event.is_action_pressed("click"):

I think it could be used in linters to add a warning with litterals.

URL to the documentation page (if already existing): https://docs.godotengine.org/en/latest/contributing/development/file_formats/gdscript_grammar.html And documentation explaining StringName https://docs.godotengine.org/en/latest/classes/class_stringname.html#class-stringname

AThousandShips commented 1 month ago

That page is outdated and needs a more general overhaul, it is mentioned elsewhere like the GDScript reference and the StringName class documentation