mirror of
https://github.com/godotengine/godot.git
synced 2025-10-26 11:14:17 +00:00
GDScript: Return early when parsing invalid super call
This commit is contained in:
parent
2303ce843a
commit
b67dcb21fd
5 changed files with 29 additions and 1 deletions
|
|
@ -3301,7 +3301,11 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_call(ExpressionNode *p_pre
|
|||
IdentifierNode *identifier = parse_identifier();
|
||||
call->callee = identifier;
|
||||
call->function_name = identifier->name;
|
||||
consume(GDScriptTokenizer::Token::PARENTHESIS_OPEN, R"(Expected "(" after function name.)");
|
||||
if (!consume(GDScriptTokenizer::Token::PARENTHESIS_OPEN, R"(Expected "(" after function name.)")) {
|
||||
pop_multiline();
|
||||
complete_extents(call);
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
call->callee = p_previous_operand;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue