summary refs log tree commit diff stats
path: root/tests/macros/ttemplatesymbols.nim
Commit message (Collapse)AuthorAgeFilesLines
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-1/+1
|
* Better support for treating templates and macros as symbols.Zahary Karadjov2018-05-071-0/+173
This allows you to pass a template or a macro to another macro which can then inspect the implementation of the former template/macro using `getImpl`. Since templates can be freely redefined, this allows you to treat their symbols as compile-time variables that have lexical scope. A motivating PoC example for a logging library taking advantage of this will be provided in the next commit. Implementation details: * The name of a template or a macro will be consider a symbol if the template/macro requires parameters * For parameterless templates/macros, you can use `bindSym`, which was extended to also work outside of compile-time procs.