mirror of
https://github.com/janet-lang/janet
synced 2024-12-28 17:30:31 +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))
|
||||||
|
(if macrof
|
||||||
|
(debug/stacktrace macrof msg)
|
||||||
(eprint
|
(eprint
|
||||||
(if ec "\e[31m" "")
|
(if ec "\e[31m" "")
|
||||||
"compile error: "
|
"compile error: "
|
||||||
msg
|
msg
|
||||||
" while compiling "
|
" while compiling "
|
||||||
where
|
where
|
||||||
(if ec "\e[0m" ""))
|
(if ec "\e[0m" ""))))
|
||||||
(when macrof (debug/stacktrace macrof)))
|
|
||||||
|
|
||||||
(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