Merge pull request #62830 from ajreckof/access-identifier-keywords

fix access to identifiers that are reserved keywords
This commit is contained in:
Yuri Sizov authored and GitHub committed 2023-04-17 17:12:10 +02:00
commit d220680bd0
3 files changed
+40

No files matched your search

+3
View File
@@ -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;