mirror of
https://github.com/janet-lang/janet
synced 2024-12-27 00:40: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."
|
||||
[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,
|
||||
|
Loading…
Reference in New Issue
Block a user