mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-17 14:50:30 +00: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:
1 parent
e54deee525
commit
a46e7dd967
31 files changed
+1240
-957
No files matched your search
@@ -49,7 +49,7 @@ auto HandleReturnStatement(Context& context, Parse::Node parse_node) -> bool {
|
||||
.Emit();
|
||||
}
|
||||
|
||||
context.AddNode(SemIR::Return(parse_node));
|
||||
context.AddNode(SemIR::Return{parse_node});
|
||||
} else {
|
||||
auto arg = context.node_stack().PopExpression();
|
||||
context.node_stack()
|
||||
@@ -72,7 +72,7 @@ auto HandleReturnStatement(Context& context, Parse::Node parse_node) -> bool {
|
||||
callable.return_type_id);
|
||||
}
|
||||
|
||||
context.AddNode(SemIR::ReturnExpression(parse_node, arg));
|
||||
context.AddNode(SemIR::ReturnExpression{parse_node, arg});
|
||||
}
|
||||
|
||||
// Switch to a new, unreachable, empty node block. This typically won't
|
||||
|
||||
Reference in new issue
Block a user