mirror of
https://github.com/godotengine/godot.git
synced 2025-10-25 18:54:43 +00:00
fix access to identifiers that are reserved keywords
This commit is contained in:
parent
44d539465a
commit
ab9f60dd1a
3 changed files with 40 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue