From c6467be60d603738a6dcdfbb77d1673bc28a185b Mon Sep 17 00:00:00 2001 From: Michael Camilleri Date: Wed, 20 Jan 2021 10:47:55 +0900 Subject: [PATCH] Conform display of path with existing display of source map info --- src/boot/boot.janet | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/boot/boot.janet b/src/boot/boot.janet index c6e69b4b..40560385 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -2848,16 +2848,16 @@ (cond (x :ref) (string :var " (" (type (in (x :ref) 0)) ")") (x :macro) :macro - (x :module) (string :module " (" (x :kind) ": " (x :path) ")") + (x :module) (string :module " (" (x :kind) ")") (type (x :value))) "\n")) (def sm (x :source-map)) (def d (x :doc)) (print "\n\n" - (if d bind-type "") - (if-let [[path line col] sm] - (string " " path " on line " line ", column " col "\n") "") - (if (or d sm) "\n" "") + (when d bind-type) + (when-let [[path line col] sm] + (string " " path (when (and line col) (string " on line " line ", column " col)) "\n")) + (when (or d sm) "\n") (if d (doc-format d) " no documentation found.") "\n\n")) @@ -2876,10 +2876,10 @@ (do (def [fullpath mod-kind] (module/find (string sym))) (if-let [mod-env (in module/cache fullpath)] - (print-module-entry {:module true - :path fullpath - :kind mod-kind - :doc (in mod-env :doc)}) + (print-module-entry {:module true + :kind mod-kind + :source-map [fullpath nil nil] + :doc (in mod-env :doc)}) (print "symbol " sym " not found."))) (print-module-entry x)))