Add node call support in C
This commit is contained in:
parent
5a54f897b1
commit
363f5043a0
@ -65,9 +65,11 @@ let pp_expression =
|
|||||||
let rec pp_expression_list prefix fmt exprs =
|
let rec pp_expression_list prefix fmt exprs =
|
||||||
match exprs with
|
match exprs with
|
||||||
| ETuple([], []) -> ()
|
| ETuple([], []) -> ()
|
||||||
|
(* TODO: assignment (in addition to the current app call support) *)
|
||||||
| ETuple (_ :: tt, expr :: exprs) ->
|
| ETuple (_ :: tt, expr :: exprs) ->
|
||||||
Format.fprintf fmt "%a%a"
|
Format.fprintf fmt "%a%s%a"
|
||||||
(pp_expression_aux (prefix^" |> ")) expr
|
(pp_expression_aux (prefix)) expr
|
||||||
|
(if (List.length tt > 0) then ", " else "")
|
||||||
(pp_expression_list prefix) (ETuple (tt, exprs))
|
(pp_expression_list prefix) (ETuple (tt, exprs))
|
||||||
| _ -> raise (MyTypeError "This exception should not have been raised.")
|
| _ -> raise (MyTypeError "This exception should not have been raised.")
|
||||||
in
|
in
|
||||||
@ -142,7 +144,6 @@ let pp_expression =
|
|||||||
(pp_expression_aux prefix) arg'
|
(pp_expression_aux prefix) arg'
|
||||||
(pp_expression_aux prefix) arg''
|
(pp_expression_aux prefix) arg''
|
||||||
end
|
end
|
||||||
(* TODO *)
|
|
||||||
| EApp (_, f, args) ->
|
| EApp (_, f, args) ->
|
||||||
Format.fprintf fmt "%s%s(%a)"
|
Format.fprintf fmt "%s%s(%a)"
|
||||||
prefix f.n_name
|
prefix f.n_name
|
||||||
@ -153,7 +154,6 @@ let pp_expression =
|
|||||||
in
|
in
|
||||||
pp_expression_aux ""
|
pp_expression_aux ""
|
||||||
|
|
||||||
(* should add a prefix for indentation *)
|
|
||||||
let rec pp_equations fmt: t_eqlist -> unit = function
|
let rec pp_equations fmt: t_eqlist -> unit = function
|
||||||
| [] -> ()
|
| [] -> ()
|
||||||
| (patt, expr) :: eqs ->
|
| (patt, expr) :: eqs ->
|
||||||
|
Loading…
Reference in New Issue
Block a user