Get all procs in given module

2020-10-31 Thread timothee
This keeps getting asked, and is a very useful feature on which I rely in my own nim fork. I wrote a PR a while back: but it was closed without much of a debate. Maybe there is hope this PR can be re-opened so I can address whatever needs to be addre

Get all procs in given module

2020-10-30 Thread cblake
In [cligen.macUt](https://github.com/c-blake/cligen/blob/master/cligen/macUt.nim), I have the caller pass a symbol to any `proc` in the module to a `macro docFromModuleOf*(sym: typed{nkSym})`. Then that can use `lineInfo` to get a pathname and then `staticRead` can slurp the whole file into a `

Get all procs in given module

2020-10-30 Thread lqdev
Unfortunately no, that's not doable. At least not with existing modules. The `macros` module contains a proc `getImpl` which you _could_ potentially use on a module name. I say _could_ , because actually using it on a module returns a `nil` node. The closest I was able to get to this was to cre

Get all procs in given module

2020-10-30 Thread ElAfalw
Ok, so I've been trying to get _all_ procs defined in a given module. Let's say in `myModule.nim` we have `proc proc1` and `proc proc2`. How can I do something like this (at compile-time): const myProcs = getProcsIn("myModule") Run and `myProcs` containing `[proc1, pr