Reverse 'type: identifier' to 'identifier: type' in executable

semantics.
This commit is contained in:
Richard Smith
2021-06-02 11:33:50 -07:00
parent da403db9ff
commit 567b9bb5a4
61 changed files with 111 additions and 111 deletions
+4 -4
View File
@@ -189,8 +189,8 @@ expression:
{ $$ = Carbon::Expression::MakeGetField(yylineno, $1, $2); }
| expression "[" expression "]"
{ $$ = Carbon::Expression::MakeIndex(yylineno, $1, $3); }
| expression ":" identifier
{ $$ = Carbon::Expression::MakeVarPat(yylineno, $3, $1); }
| identifier ":" expression
{ $$ = Carbon::Expression::MakeVarPat(yylineno, $1, $3); }
| integer_literal
{ $$ = Carbon::Expression::MakeInt(yylineno, $1); }
| TRUE
@@ -340,8 +340,8 @@ function_declaration:
FN identifier tuple return_type ";"
{ $$ = MakeFunDef(yylineno, $2, $4, $3, 0); }
;
variable_declaration: expression ":" identifier
{ $$ = MakeField(yylineno, $3, $1); }
variable_declaration: identifier ":" expression
{ $$ = MakeField(yylineno, $1, $3); }
;
member: VAR variable_declaration ";"
{ $$ = $2; }