mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Fix lambda parsing continuing on subsequent lines #73273
This commit is contained in:
parent
329652b6fe
commit
bf04c55175
5 changed files with 93 additions and 1 deletions
|
@ -2231,7 +2231,7 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_precedence(Precedence p_pr
|
|||
ExpressionNode *previous_operand = (this->*prefix_rule)(nullptr, p_can_assign);
|
||||
|
||||
while (p_precedence <= get_rule(current.type)->precedence) {
|
||||
if (previous_operand == nullptr || (p_stop_on_assign && current.type == GDScriptTokenizer::Token::EQUAL) || (previous_operand->type == Node::LAMBDA && lambda_ended)) {
|
||||
if (previous_operand == nullptr || (p_stop_on_assign && current.type == GDScriptTokenizer::Token::EQUAL) || lambda_ended) {
|
||||
return previous_operand;
|
||||
}
|
||||
// Also switch multiline mode on here for infix operators.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue