mirror of
https://github.com/janet-lang/janet
synced 2024-12-26 00:10:27 +00:00
Add source location to doc macro.
This commit is contained in:
parent
5865692401
commit
ef5eed2c21
@ -1211,9 +1211,12 @@ value, one key will be ignored."
|
|||||||
x:macro :macro
|
x:macro :macro
|
||||||
(type x:value))
|
(type x:value))
|
||||||
"\n"))
|
"\n"))
|
||||||
|
(def sm x:source-map)
|
||||||
(def d x:doc)
|
(def d x:doc)
|
||||||
(print "\n\n"
|
(print "\n\n"
|
||||||
(if d bind-type "")
|
(if d bind-type "")
|
||||||
|
(if-let [[path start end] sm] (string " " path " (" start ":" end ")\n") "")
|
||||||
|
(if (or d sm) "\n" "")
|
||||||
(if d (doc-format d) "no documentation found.")
|
(if d (doc-format d) "no documentation found.")
|
||||||
"\n\n"))))
|
"\n\n"))))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user