Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
presenthee committed Aug 20, 2024
1 parent 4c1a831 commit d3ec1a7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions spectec/src/il2al/translate.ml
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,9 @@ and translate_exp exp =
(* Constructor *)
(* TODO: Need a better way to convert these CaseE into ConstructE *)
(* TODO: type *)
| [ [{it = Il.LBrack; _}]; [{it = Il.Dot2; _}]; [{it = Il.RBrack; _}] ], [ e1; e2 ] ->
tupE [ translate_exp e1; translate_exp e2 ] ~at:at ~note:note
| [ []; [] ], [ e1 ] -> translate_exp e1
| [ []; []; [] ], [ e1; e2 ] ->
tupE [ translate_exp e1; translate_exp e2 ] ~at:at ~note:note
| [ []; []; [] ], [ e1; e2 ]
| [ [{it = Il.LBrack; _}]; [{it = Il.Dot2; _}]; [{it = Il.RBrack; _}] ], [ e1; e2 ]
| [ []; [{it = Il.Semicolon; _}]; [] ], [ e1; e2 ] ->
tupE [ translate_exp e1; translate_exp e2 ] ~at:at ~note:note
| _, _ when List.length op = List.length exps + 1 ->
Expand Down

0 comments on commit d3ec1a7

Please sign in to comment.