Skip to content

Commit

Permalink
rex: DEBUG-EVAL in stepA, not for macros
Browse files Browse the repository at this point in the history
  • Loading branch information
asarhaddon authored and kanaka committed Oct 9, 2024
1 parent 107a74f commit 8c8a46b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions impls/rexx/stepA_mal.rexx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ eval: procedure expose values. env. err /* eval(ast) */
ast = arg(1)
env_idx = arg(2)
do forever

debug_eval = obj_type(env_get(env_idx, "DEBUG-EVAL"))
if debug_eval <> "ERR" & debug_eval <> "nill" & debug_eval <> "fals" then,
call lineout , ("EVAL: " || print(ast))

if \list?(ast) then return eval_ast(ast, env_idx)
ast = macroexpand(ast, env_idx)
if \list?(ast) then return eval_ast(ast, env_idx)
Expand Down

0 comments on commit 8c8a46b

Please sign in to comment.