Skip to content

Commit

Permalink
[enhance] OpaPrint: better if else block printing
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricss committed Mar 8, 2012
1 parent 2d19cdd commit 48a91aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions opalang/opaPrint.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1278,11 +1278,11 @@ module Js = struct
(if self#expr_need_block e2 then
pp f "@[<2>if (%a) {@\n%a@]@\n@[<2>} " (* TODO ?? *)
else
pp f "if (%a) %a @[<2>") self#expr e1 self#expr e2;
pp f "@[<2>if (%a)@ %a@]@ @[<2>") self#expr e1 self#expr e2;
(if self#expr_need_block e3 then
pp f "else {@\n%a@]@\n}" (* TODO ?? *)
else
pp f "else %a@]") self#expr e3;
pp f "else@ %a@]") self#expr e3;

| `xhtml e -> Sugar.Xhtml.pp_xml self#expr_sugar f e
| `action e -> Sugar.Action.pp self#to_unprotected_ident self#expr_sugar f e
Expand Down

0 comments on commit 48a91aa

Please sign in to comment.