mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +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
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