mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
LibCpp: Differentiate between Type and NamedType
This adds a new ASTNode type called 'NamedType' which inherits from the Type node. Previously every Type node had a name field, but it was not logically accurate. For example, pointer types do not have a name (the pointed-to type may have one).
This commit is contained in:
parent
10cad8a874
commit
d7aa831a43
Notes:
sideshowbarker
2024-07-18 11:23:22 +09:00
Author: https://github.com/itamar8910
Commit: d7aa831a43
Pull-request: https://github.com/SerenityOS/serenity/pull/8260
Reviewed-by: https://github.com/alimpfard
5 changed files with 55 additions and 29 deletions
|
@ -75,7 +75,7 @@ void Type::dump(FILE* output, size_t indent) const
|
|||
outln(output, "{}", to_string());
|
||||
}
|
||||
|
||||
String Type::to_string() const
|
||||
String NamedType::to_string() const
|
||||
{
|
||||
String qualifiers_string;
|
||||
if (!m_qualifiers.is_empty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue