1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 18:27:39 +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

@ -89,6 +89,7 @@ private:
bool match_namespace_declaration();
bool match_template_arguments();
bool match_name();
bool match_cpp_cast_expression();
enum class TemplatizedMatchResult {
NoMatch,
@ -131,6 +132,7 @@ private:
RefPtr<Declaration> parse_single_declaration_in_translation_unit(ASTNode& parent);
NonnullRefPtrVector<Type> parse_template_arguments(ASTNode& parent);
NonnullRefPtr<Name> parse_name(ASTNode& parent);
NonnullRefPtr<CppCastExpression> parse_cpp_cast_expression(ASTNode& parent);
bool match(Token::Type);
Token consume(Token::Type);