1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-25 09:47:17 +00:00

Add source file info on macro compiler error.

This commit is contained in:
Calvin Rose 2020-01-20 16:45:57 -06:00
parent 3cb947b37e
commit 77742dec11

View File

@ -1783,7 +1783,7 @@
[msg macrof where] [msg macrof where]
(def ec (dyn :err-color)) (def ec (dyn :err-color))
(if macrof (if macrof
(debug/stacktrace macrof msg) (debug/stacktrace macrof (string msg " while compiling " where))
(eprint (eprint
(if ec "\e[31m" "") (if ec "\e[31m" "")
"compile error: " "compile error: "