mirror of
https://github.com/godotengine/godot.git
synced 2025-10-31 21:51:22 +00:00
Fix GDScript parser crash on 'dollar mixed with assignment' expression
fixes #53696
This commit is contained in:
parent
ed02b8af59
commit
1a15a3adf6
3 changed files with 7 additions and 0 deletions
|
|
@ -2420,6 +2420,9 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_assignment(ExpressionNode
|
||||||
push_error("Assignment is not allowed inside an expression.");
|
push_error("Assignment is not allowed inside an expression.");
|
||||||
return parse_expression(false); // Return the following expression.
|
return parse_expression(false); // Return the following expression.
|
||||||
}
|
}
|
||||||
|
if (p_previous_operand == nullptr) {
|
||||||
|
return parse_expression(false); // Return the following expression.
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
VariableNode *source_variable = nullptr;
|
VariableNode *source_variable = nullptr;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
func test():
|
||||||
|
$=$
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
GDTEST_PARSER_ERROR
|
||||||
|
Expect node path as string or identifier after "$".
|
||||||
Loading…
Add table
Add a link
Reference in a new issue