1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-27 17:00:27 +00:00

Fix macro errors.

debug/stacktrace was being called incorrectly.
This commit is contained in:
Calvin Rose 2020-01-20 16:05:08 -06:00
parent 62cf407f0c
commit 3cb947b37e

View File

@ -1782,14 +1782,15 @@
"Default handler for a compile error."
[msg macrof where]
(def ec (dyn :err-color))
(eprint
(if ec "\e[31m" "")
"compile error: "
msg
" while compiling "
where
(if ec "\e[0m" ""))
(when macrof (debug/stacktrace macrof)))
(if macrof
(debug/stacktrace macrof msg)
(eprint
(if ec "\e[31m" "")
"compile error: "
msg
" while compiling "
where
(if ec "\e[0m" ""))))
(defn run-context
"Run a context. This evaluates expressions of janet in an environment,