mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:07:45 +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
|
@ -696,4 +696,20 @@ public:
|
|||
NonnullRefPtrVector<Declaration> m_declarations;
|
||||
};
|
||||
|
||||
class CppCastExpression : public Expression {
|
||||
public:
|
||||
CppCastExpression(ASTNode* parent, Optional<Position> start, Optional<Position> end, const String& filename)
|
||||
: Expression(parent, start, end, filename)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~CppCastExpression() override = default;
|
||||
virtual const char* class_name() const override { return "CppCastExpression"; }
|
||||
virtual void dump(size_t indent) const override;
|
||||
|
||||
StringView m_cast_type;
|
||||
RefPtr<Type> m_type;
|
||||
RefPtr<Expression> m_expression;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue