Stop using std::pair in the implementation of tuples (#479)

This commit is contained in:
Geoff Romer
2021-04-26 11:43:06 -07:00
committed by GitHub
parent 3ff01fa60d
commit 1933cfeeeb
10 changed files with 127 additions and 139 deletions
+2 -8
View File
@@ -323,11 +323,7 @@ statement_list:
;
return_type:
// Empty
{
$$ = Carbon::MakeTuple(
yylineno,
new std::vector<std::pair<std::string, const Carbon::Expression*>>());
}
{ $$ = Carbon::MakeUnit(yylineno); }
| ARROW expression
{ $$ = $2; }
;
@@ -362,9 +358,7 @@ alternative:
| identifier
{
$$ = new std::pair<std::string, const Carbon::Expression*>(
$1, Carbon::MakeTuple(
yylineno,
new std::vector<std::pair<std::string, const Carbon::Expression*>>()));
$1, Carbon::MakeUnit(yylineno));
}
;
alternative_list: