Skip to content
Snippets Groups Projects
Commit f114bd5a authored by Alan Schmitt's avatar Alan Schmitt Committed by Thomas Wood
Browse files

try to tweak return

parent f17d21c4
No related branches found
No related tags found
No related merge requests found
......@@ -368,15 +368,12 @@ let generate_logged_return ctx sbody =
let (token_start, token_stop, token_lineof) = token_fresh() in
match !current_mode with
| Mode_cmi -> assert false
| Mode_line_token ->
| Mode_unlogged | Mode_line_token ->
Printf.sprintf "%sreturn %s;%s" token_start sbody token_stop
| Mode_logged ->
let id = id_fresh "_return_" in
Printf.sprintf "var %s = %s;@,log_event(%s, ctx_push(%s, [{key: \"return_value\", value: %s}]), \"return\");@,return %s; "
id sbody token_lineof ctx id id
| Mode_unlogged ->
Printf.sprintf "return %s; " sbody
(* Printf.sprintf "@[<v 0>return %s;@]" sbody *)
(*
----
[insertReturnCode(e,ctx)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment