mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
GDScript: Change parser representation of class extends
This commit is contained in:
parent
550a779851
commit
4e34cf238a
10 changed files with 43 additions and 26 deletions
|
@ -712,14 +712,14 @@ void GDScriptParser::parse_extends() {
|
|||
if (!consume(GDScriptTokenizer::Token::IDENTIFIER, R"(Expected superclass name after "extends".)")) {
|
||||
return;
|
||||
}
|
||||
current_class->extends.push_back(previous.literal);
|
||||
current_class->extends.push_back(parse_identifier());
|
||||
|
||||
while (match(GDScriptTokenizer::Token::PERIOD)) {
|
||||
make_completion_context(COMPLETION_INHERIT_TYPE, current_class, chain_index++);
|
||||
if (!consume(GDScriptTokenizer::Token::IDENTIFIER, R"(Expected superclass name after ".".)")) {
|
||||
return;
|
||||
}
|
||||
current_class->extends.push_back(previous.literal);
|
||||
current_class->extends.push_back(parse_identifier());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4479,7 +4479,7 @@ void GDScriptParser::TreePrinter::print_class(ClassNode *p_class) {
|
|||
} else {
|
||||
first = false;
|
||||
}
|
||||
push_text(p_class->extends[i]);
|
||||
push_text(p_class->extends[i]->name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue