Clean up some uses of the node stack. (#3512)

Also minor cleanups for the stack itself.
This commit is contained in:
Richard Smith
2023-12-14 20:57:03 +00:00
committed by GitHub
parent fbb4ecf319
commit 0a1abe9f64
9 changed files with 76 additions and 66 deletions
+1 -2
View File
@@ -34,8 +34,7 @@ auto HandleVariableInitializer(Context& context, Parse::NodeId parse_node)
auto HandleVariableDecl(Context& context, Parse::NodeId parse_node) -> bool {
// Handle the optional initializer.
auto init_id = SemIR::InstId::Invalid;
Parse::NodeKind next_kind =
context.parse_tree().node_kind(context.node_stack().PeekParseNode());
Parse::NodeKind next_kind = context.node_stack().PeekParseNodeKind();
if (next_kind == Parse::NodeKind::TuplePattern) {
return context.TODO(parse_node, "tuple pattern in var");
}