summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-02-04 19:03:28 +0100
committerGitHub <noreply@github.com>2022-02-04 19:03:28 +0100
commit77d08b68b06b5b821d90ac561c261c93b4bc5928 (patch)
treea5c7cd011de91761d5443b0eca9f0134f650018d
parent2885befbe6891ab20606dabdfb6f62184156f477 (diff)
parentde45534fed49523211ee234185f101f4e5ec80ff (diff)
Merge pull request #49445 from Calinou/gdscript-highlight-namespace-reserved-keyword
-rw-r--r--modules/gdscript/gdscript.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index 5b40c94110..a80874d785 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -2022,8 +2022,6 @@ void GDScriptLanguage::get_reserved_words(List<String> *p_words) const {
"preload",
"signal",
"super",
- "trait",
- "yield",
// var
"const",
"enum",
@@ -2040,6 +2038,11 @@ void GDScriptLanguage::get_reserved_words(List<String> *p_words) const {
"return",
"match",
"while",
+ // These keywords are not implemented currently, but reserved for (potential) future use.
+ // We highlight them as keywords to make errors easier to understand.
+ "trait",
+ "namespace",
+ "yield",
nullptr
};