Remove most of the metaprogramming in node.h in favor of listing all the members in the typed node structs. (#3310)

Split `node.h` into separate files for ID types (`id.h`) and for typed
nodes (`typed_nodes.h`). The per-node-kind data is now specified as part
of declaring the typed nodes, and is removed from the node kinds
x-macros, which now simply enumerate the node kinds.
This commit is contained in:
Richard Smith
2023-10-20 20:26:10 +00:00
committed by GitHub
parent e54deee525
commit a46e7dd967
31 changed files with 1240 additions and 957 deletions
+2 -2
View File
@@ -27,8 +27,8 @@ static auto BuildClassDeclaration(Context& context)
// Add the class declaration.
auto class_decl =
SemIR::ClassDeclaration(class_keyword, SemIR::TypeId::TypeType,
SemIR::ClassId::Invalid, decl_block_id);
SemIR::ClassDeclaration{class_keyword, SemIR::TypeId::TypeType,
SemIR::ClassId::Invalid, decl_block_id};
auto class_decl_id = context.AddNode(class_decl);
// Check whether this is a redeclaration.