import std/[sugar, importutils]
# p: PProc, typ: PType
# their types are defined in
# import "$nim/compiler/ast.nim"
privateAccess p.type
dump p.module
dump p.module.module.name.s
dump p.prc.info.line
dump p.prc.name.s
dump typ
For X is from n_p1.kind (will just shown as a char)
import "$nim/compiler/nodekinds.nim”
nodekinds X
For those > 24 (nkComesFrom.ord), they has .sons (access via ._kind6.sons)
for p_p0: PProc, n_p1: PNode
define ps
p $arg0.p.data
end
set $fileInfos=p_p0.module.config.m.fileInfos
define pfp
ps $fileInfos.p.data[$arg0.fileIndex].fullPath