genSym support for hygienic macros and templates.
example: template hygienic(val: expr) = var `*x` = val echo `*x` *x was chosen as mnemonic for "opposite of public" and thus private
This commit is contained in:
parent
bc2eb0ea9b
commit
6216046bc6
6 changed files with 34 additions and 70 deletions
|
|
@ -13,7 +13,7 @@
|
|||
proc semTemplateExpr(c: PContext, n: PNode, s: PSym, semCheck = true): PNode =
|
||||
markUsed(n, s)
|
||||
pushInfoContext(n.info)
|
||||
result = evalTemplate(c, n, s)
|
||||
result = evalTemplate(n, s)
|
||||
if semCheck: result = semAfterMacroCall(c, result, s)
|
||||
popInfoContext()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue