Simplify ETriOp case in src/ast_to_c.ml

This commit is contained in:
Benjamin Loison 2022-12-11 22:25:11 +01:00
parent 014110791d
commit 298e88f1a5

View File

@ -156,8 +156,7 @@ let pp_expression node_name =
pp_expression_aux arg' pp_expression_aux arg'
end end
| ETriOp (_, top, arg, arg', arg'') -> | ETriOp (_, top, arg, arg', arg'') ->
begin match top with begin
| TOp_if | TOp_merge ->
Format.fprintf fmt "%a ? %a : %a" Format.fprintf fmt "%a ? %a : %a"
pp_expression_aux arg pp_expression_aux arg
pp_expression_aux arg' pp_expression_aux arg'