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:
parent
62cf407f0c
commit
3cb947b37e
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user