1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:57:35 +00:00

LibCpp: Parse inheritance

This commit is contained in:
Itamar 2022-04-03 21:55:55 +03:00 committed by Ali Mohammad Pur
parent 8cfabbcd93
commit f4cca20972
8 changed files with 43 additions and 1 deletions

View file

@ -333,6 +333,19 @@ void StructOrClassDeclaration::dump(FILE* output, size_t indent) const
ASTNode::dump(output, indent);
print_indent(output, indent);
outln(output, "{}", full_name());
if (!m_baseclasses.is_empty()) {
print_indent(output, indent + 1);
outln(output, ":");
for (size_t i = 0; i < m_baseclasses.size(); ++i) {
auto& baseclass = m_baseclasses[i];
baseclass.dump(output, indent + 1);
if (i < m_baseclasses.size() - 1) {
print_indent(output, indent + 1);
outln(output, ",");
}
}
}
outln(output, "");
for (auto& member : m_members) {
member.dump(output, indent + 1);
}