GDScript: Allow "extends" to be used inside inner class
This commit is contained in:
parent
34dc689ad4
commit
edb4caf24e
@ -586,6 +586,14 @@ GDScriptParser::ClassNode *GDScriptParser::parse_class() {
|
|||||||
return n_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();
|
parse_class_body();
|
||||||
|
|
||||||
consume(GDScriptTokenizer::Token::DEDENT, R"(Missing unindent at the end of the class body.)");
|
consume(GDScriptTokenizer::Token::DEDENT, R"(Missing unindent at the end of the class body.)");
|
||||||
|
Loading…
Reference in New Issue
Block a user