Infix operators in printers
Infix operators handled in Heptagon and Minils printers
This commit is contained in:
parent
7720a632cc
commit
2d150a3a3d
2 changed files with 6 additions and 0 deletions
|
@ -194,6 +194,9 @@ and print_app ff (app, args) =
|
|||
| Efun { name = n } when (n = "*" or n = "*.") ->
|
||||
let a1, a2 = assert_2 args in
|
||||
fprintf ff "@[%a@, %s@, %a@]" print_exp a1 n print_exp a2
|
||||
| Efun { qual = Pervasives; name = n } when (is_infix n) ->
|
||||
let a1, a2 = assert_2 args in
|
||||
fprintf ff "@[(%a@, %s@, %a)@]" print_exp a1 n print_exp a2
|
||||
| Efun f ->
|
||||
fprintf ff "@[%a@,%a@,%a@]"
|
||||
print_qualname f print_params app.a_params print_exp_tuple args
|
||||
|
|
|
@ -154,6 +154,9 @@ and print_app ff (app, args) =
|
|||
| Eequal ->
|
||||
let e1, e2 = assert_2 args in
|
||||
fprintf ff "@[<2>%a@ = %a@]" print_extvalue e1 print_extvalue e2
|
||||
| Efun { qual = Pervasives; name = n } when (is_infix n) ->
|
||||
let a1, a2 = assert_2 args in
|
||||
fprintf ff "@[(%a@, %s@, %a)@]" print_extvalue a1 n print_extvalue a2
|
||||
| Efun f | Enode f ->
|
||||
fprintf ff "@[%a@,%a@,%a@]"
|
||||
print_qualname f print_params app.a_params print_w_tuple args
|
||||
|
|
Loading…
Reference in a new issue