@Lando Thank you for pointing it out. Too bad it's not documented, I tend to
avoid using undocumented stuff. ^^" Actually, I think I even used lineInfoObj
once like a year ago so I probably forgot about it.
It is actually possible if you don't mind using undocumented behavior of
getImpl (the docs say it works only for procedures and constants, but that
doesn't seem to be true):
# a.nim
type Mock* = object
# b.nim
import macros, strutils
import a as al
type
I don't think that's possible. Although that would be a nice feature.
Is it possible to generate a docs link based on NimSym? Or, even better, based
on an argument's type?
Here comes an example:
# a.nim
type Mock = object
# b.nim
import a
macro add2docs(sym: typed, docs: string): typed =
newCommentStmtNode(docs.format(