You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
GDScript: Allow "extends" to be used inside inner class
This commit is contained in:
@@ -586,6 +586,14 @@ GDScriptParser::ClassNode *GDScriptParser::parse_class() {
|
||||
return n_class;
|
||||
}
|
||||
|
||||
if (match(GDScriptTokenizer::Token::EXTENDS)) {
|
||||
if (n_class->extends_used) {
|
||||
push_error(R"(Cannot use "extends" more than once in the same class.)");
|
||||
}
|
||||
parse_extends();
|
||||
end_statement("superclass");
|
||||
}
|
||||
|
||||
parse_class_body();
|
||||
|
||||
consume(GDScriptTokenizer::Token::DEDENT, R"(Missing unindent at the end of the class body.)");
|
||||
|
||||
Reference in New Issue
Block a user