1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:17:36 +00:00

LibCpp: Parse C++ cast expressions

parse static_cast, reinterpret_cast, dynamic_cast & const_cast
This commit is contained in:
Itamar 2021-03-31 22:21:31 +03:00 committed by Andreas Kling
parent 646aaa111b
commit 8962581c9c
4 changed files with 74 additions and 1 deletions

View file

@ -501,7 +501,24 @@ void TemplatizedFunctionCall::dump(size_t indent) const
for (const auto& arg : m_arguments) {
arg.dump(indent + 1);
}
}
void CppCastExpression::dump(size_t indent) const
{
ASTNode::dump(indent);
print_indent(indent);
outln("{}", m_cast_type);
print_indent(indent + 1);
outln("<");
if (m_type)
m_type->dump(indent + 1);
print_indent(indent + 1);
outln(">");
if (m_expression)
m_expression->dump(indent + 1);
}
}