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
commit 8962581c9c
Notes: sideshowbarker 2024-07-18 20:41:45 +09:00
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);