summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.cpp
diff options
context:
space:
mode:
authorajreckof <66184050+ajreckof@users.noreply.github.com>2023-04-05 19:52:01 +0200
committerajreckof <66184050+ajreckof@users.noreply.github.com>2023-04-14 20:37:24 +0200
commitab9f60dd1aa6e1d5b6b24878e9dc6a290d95be8f (patch)
treeccc51e418c8d6d3730b7d6917b4dbdbdc2a78193 /modules/gdscript/gdscript_parser.cpp
parent44d539465acca7592e0c88748e231fe5f151da37 (diff)
downloadredot-engine-ab9f60dd1aa6e1d5b6b24878e9dc6a290d95be8f.tar.gz
fix access to identifiers that are reserved keywords
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
-rw-r--r--modules/gdscript/gdscript_parser.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index e2a37ab6e9..e37a40c2ab 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -2820,6 +2820,9 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_attribute(ExpressionNode *
attribute->base = p_previous_operand;
+ if (current.is_node_name()) {
+ current.type = GDScriptTokenizer::Token::IDENTIFIER;
+ }
if (!consume(GDScriptTokenizer::Token::IDENTIFIER, R"(Expected identifier after "." for attribute access.)")) {
complete_extents(attribute);
return attribute;