From 134bf9bbdc8c58d04c5cf4b268538b25732e5c33 Mon Sep 17 00:00:00 2001 From: pk19604014 <95385881+pk19604014@users.noreply.github.com> Date: Tue, 29 Mar 2022 14:04:45 -0400 Subject: [PATCH] Preserve the order of expressions in deduced_param_list (#1157) --- executable_semantics/syntax/parser.ypp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/executable_semantics/syntax/parser.ypp b/executable_semantics/syntax/parser.ypp index 16b7c7efce80..e8443b9fede2 100644 --- a/executable_semantics/syntax/parser.ypp +++ b/executable_semantics/syntax/parser.ypp @@ -786,20 +786,20 @@ deduced_param_list: $$ = std::vector>(); $$.push_back($1); } -| generic_binding COMMA deduced_param_list +| deduced_param_list COMMA generic_binding { - $$ = $3; - $$.push_back($1); + $$ = $1; + $$.push_back($3); } | variable_declaration { $$ = std::vector>(); $$.push_back($1); } -| variable_declaration COMMA deduced_param_list +| deduced_param_list COMMA variable_declaration { - $$ = $3; - $$.push_back($1); + $$ = $1; + $$.push_back($3); } ; deduced_params: