LibCpp: Add AST::Name

A Name node is basically an identifier with an optional scope,
e.g Core::File.
This commit is contained in:
Itamar 2021-03-29 16:52:35 +03:00 committed by Andreas Kling
commit 3295609aea
Notes: sideshowbarker 2024-07-18 20:42:02 +09:00
5 changed files with 105 additions and 44 deletions

View file

@ -89,6 +89,7 @@ private:
bool match_block_statement();
bool match_namespace_declaration();
bool match_template_arguments();
bool match_name();
enum class MatchTypeResult {
NoMatch,
@ -129,6 +130,7 @@ private:
NonnullRefPtrVector<Declaration> parse_declarations_in_translation_unit(ASTNode& parent);
RefPtr<Declaration> parse_single_declaration_in_translation_unit(ASTNode& parent);
NonnullRefPtrVector<Type> parse_template_arguments(ASTNode& parent);
NonnullRefPtr<Name> parse_name(ASTNode& parent);
bool match(Token::Type);
Token consume(Token::Type);