mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
LibCpp: Parse C++ cast expressions
parse static_cast, reinterpret_cast, dynamic_cast & const_cast
This commit is contained in:
parent
646aaa111b
commit
8962581c9c
4 changed files with 74 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue