mirror of
https://github.com/MorizzG/MLox.git
synced 2025-12-06 04:22:41 +00:00
removed print in call
This commit is contained in:
parent
99e5313308
commit
9fcb89460d
1 changed files with 5 additions and 4 deletions
|
|
@ -87,12 +87,13 @@ let rec interpret_expr (env : environment) (expr_node : expr_node) :
|
||||||
in
|
in
|
||||||
let* args = List.fold_left f (Ok []) args in
|
let* args = List.fold_left f (Ok []) args in
|
||||||
let args = List.rev args in
|
let args = List.rev args in
|
||||||
let args_s =
|
(* let args_s =
|
||||||
List.fold_left (fun acc value -> acc ^ " " ^ string_of_lox_value value) "" args
|
List.fold_left (fun acc value -> acc ^ " " ^ string_of_lox_value value) "" args
|
||||||
in
|
in
|
||||||
Printf.eprintf "Called %s with args%s\n%!" (string_of_lox_value callee) args_s;
|
Printf.eprintf "Called %s with args%s\n%!" (string_of_lox_value callee) args_s; *)
|
||||||
match callee with
|
match callee with
|
||||||
| _ ->
|
| _ ->
|
||||||
|
ignore args;
|
||||||
let msg = Printf.sprintf "%s object is not callable" (type_string_of_lox_value callee) in
|
let msg = Printf.sprintf "%s object is not callable" (type_string_of_lox_value callee) in
|
||||||
RuntimeError.make pos msg |> Result.error)
|
RuntimeError.make pos msg |> Result.error)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue