1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-28 09:20:26 +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." "Default handler for a compile error."
[msg macrof where] [msg macrof where]
(def ec (dyn :err-color)) (def ec (dyn :err-color))
(eprint (if macrof
(if ec "\e[31m" "") (debug/stacktrace macrof msg)
"compile error: " (eprint
msg (if ec "\e[31m" "")
" while compiling " "compile error: "
where msg
(if ec "\e[0m" "")) " while compiling "
(when macrof (debug/stacktrace macrof))) where
(if ec "\e[0m" ""))))
(defn run-context (defn run-context
"Run a context. This evaluates expressions of janet in an environment, "Run a context. This evaluates expressions of janet in an environment,