mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 00:56:39 +00:00
LibCpp: Add support for type aliases with typedef/using
This commit is contained in:
parent
2e2e535abb
commit
543ccecc0b
Notes:
sideshowbarker
2024-07-16 21:34:08 +09:00
Author: https://github.com/alimpfard
Commit: 543ccecc0b
Pull-request: https://github.com/SerenityOS/serenity/pull/19447
Reviewed-by: https://github.com/AtkinsSJ
4 changed files with 115 additions and 0 deletions
|
@ -50,6 +50,8 @@ private:
|
|||
Constructor,
|
||||
Destructor,
|
||||
UsingNamespace,
|
||||
Typedef,
|
||||
UsingType,
|
||||
};
|
||||
|
||||
Optional<DeclarationType> match_declaration_in_translation_unit();
|
||||
|
@ -82,6 +84,8 @@ private:
|
|||
bool match_constructor(StringView class_name);
|
||||
bool match_destructor(StringView class_name);
|
||||
bool match_using_namespace_declaration();
|
||||
bool match_typedef_declaration();
|
||||
bool match_using_type_declaration();
|
||||
|
||||
Optional<Vector<NonnullRefPtr<Parameter const>>> parse_parameter_list(ASTNode const& parent);
|
||||
Optional<Token> consume_whitespace();
|
||||
|
@ -122,6 +126,8 @@ private:
|
|||
NonnullRefPtr<Constructor const> parse_constructor(ASTNode const& parent);
|
||||
NonnullRefPtr<Destructor const> parse_destructor(ASTNode const& parent);
|
||||
NonnullRefPtr<UsingNamespaceDeclaration const> parse_using_namespace_declaration(ASTNode const& parent);
|
||||
NonnullRefPtr<TypedefDeclaration const> parse_typedef_declaration(ASTNode const& parent);
|
||||
NonnullRefPtr<TypedefDeclaration const> parse_using_type_declaration(ASTNode const& parent);
|
||||
|
||||
bool match(Token::Type);
|
||||
Token consume(Token::Type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue