summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-06-09 01:19:16 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2022-02-04 17:46:13 +0100
commitde45534fed49523211ee234185f101f4e5ec80ff (patch)
tree793ad2c25c7f63b89478f156ad4c8d89496cdb86
parent8495be9cece924b22a8148ce335d04836027bc40 (diff)
Highlight "namespace" as a GDScript keyword in the syntax highlighter
Like "trait" and "yield", "namespace" is currently not implemented but is still reserved for future use.
-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
};