mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 13:51:04 +01:00
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:
@@ -41,7 +41,7 @@ auto HandleVariableDeclaration(Context& context, Parse::Node parse_node)
|
||||
init_id = Initialize(context, parse_node, var_id, init_id);
|
||||
// TODO: Consider using different node kinds for assignment versus
|
||||
// initialization.
|
||||
context.AddNode(SemIR::Assign(parse_node, var_id, init_id));
|
||||
context.AddNode(SemIR::Assign{parse_node, var_id, init_id});
|
||||
}
|
||||
|
||||
context.node_stack()
|
||||
|
||||
Reference in New Issue
Block a user