Change ParameterList to use a Start that brackets params (#2403)

The code change is small here. I'm breaking this out because it has a lot of test churn, and semantics doesn't have significant logic around it yet.
This commit is contained in:
Jon Ross-Perkins
2022-11-17 08:57:22 -08:00
committed by GitHub
parent 5da32bd560
commit fbed1398fe
48 changed files with 98 additions and 103 deletions
@@ -105,7 +105,7 @@ auto SemanticsParseTreeHandler::Build() -> void {
}
case ParseNodeKind::DeclaredName():
case ParseNodeKind::FunctionIntroducer():
case ParseNodeKind::ParameterListEnd():
case ParseNodeKind::ParameterListStart():
case ParseNodeKind::ReturnStatementStart(): {
// The token has no action, but we still track it for the stack.
Push(parse_node);
@@ -249,7 +249,7 @@ auto SemanticsParseTreeHandler::HandleParameterList(ParseTree::Node parse_node)
// it's unused and only stored so that node counts match.
// TODO: Reorder with ParameterListStart so that we can traverse without
// subtree_size.
Pop(ParseNodeKind::ParameterListEnd());
Pop(ParseNodeKind::ParameterListStart());
Push(parse_node);
}