You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-20 14:45:44 +00:00
GDScript: Return early when parsing invalid super call
This commit is contained in:
@@ -3301,7 +3301,11 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_call(ExpressionNode *p_pre
|
|||||||
IdentifierNode *identifier = parse_identifier();
|
IdentifierNode *identifier = parse_identifier();
|
||||||
call->callee = identifier;
|
call->callee = identifier;
|
||||||
call->function_name = identifier->name;
|
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 {
|
} else {
|
||||||
call->callee = p_previous_operand;
|
call->callee = p_previous_operand;
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
[output]
|
||||||
|
include=[
|
||||||
|
; GDScript: class_a.notest.gd
|
||||||
|
{"display": "func_of_a()"},
|
||||||
|
]
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
extends "res://completion/class_a.notest.gd"
|
||||||
|
|
||||||
|
func test():
|
||||||
|
super.➡
|
||||||
|
|
||||||
|
if true:
|
||||||
|
pass
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
[output]
|
||||||
|
include=[
|
||||||
|
; GDScript: class_a.notest.gd
|
||||||
|
{"display": "func_of_a()"},
|
||||||
|
]
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
extends "res://completion/class_a.notest.gd"
|
||||||
|
|
||||||
|
func test():
|
||||||
|
super.f➡
|
||||||
|
|
||||||
|
if true:
|
||||||
|
pass
|
||||||
Reference in New Issue
Block a user