godotengine / godotengine/godot-docs

GDScript Ampersand & StringName not in grammar documentation

Open
#9,602 1 comment 0 reactions 0 assignees View on GitHub
area:engine details enhancement
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

**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:
```gdscript
if event.is_action_pressed(&"click"):
```
versus
```gdscript
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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.