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
+4 -4
View File
@@ -158,9 +158,9 @@ TEST_F(ParseTreeTest, PrintPostorderAsYAML) {
auto file = Yaml::SequenceValue{
Yaml::MappingValue{{"kind", "FunctionIntroducer"}, {"text", "fn"}},
Yaml::MappingValue{{"kind", "DeclaredName"}, {"text", "F"}},
Yaml::MappingValue{{"kind", "ParameterListEnd"}, {"text", ")"}},
Yaml::MappingValue{{"kind", "ParameterListStart"}, {"text", "("}},
Yaml::MappingValue{
{"kind", "ParameterList"}, {"text", "("}, {"subtree_size", "2"}},
{"kind", "ParameterList"}, {"text", ")"}, {"subtree_size", "2"}},
Yaml::MappingValue{{"kind", "FunctionDeclaration"},
{"text", ";"},
{"subtree_size", "5"}},
@@ -181,7 +181,7 @@ TEST_F(ParseTreeTest, PrintPreorderAsYAML) {
auto parameter_list = Yaml::SequenceValue{
Yaml::MappingValue{
{"node_index", "2"}, {"kind", "ParameterListEnd"}, {"text", ")"}},
{"node_index", "2"}, {"kind", "ParameterListStart"}, {"text", "("}},
};
auto function_decl = Yaml::SequenceValue{
@@ -191,7 +191,7 @@ TEST_F(ParseTreeTest, PrintPreorderAsYAML) {
{"node_index", "1"}, {"kind", "DeclaredName"}, {"text", "F"}},
Yaml::MappingValue{{"node_index", "3"},
{"kind", "ParameterList"},
{"text", "("},
{"text", ")"},
{"subtree_size", "2"},
{"children", parameter_list}},
};