Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion compiler/evaltempl.nim
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ proc evalTemplateAux(templ, actual: PNode, c: var TemplCtx, result: PNode) =
# internalAssert c.config, false
idTablePut(c.mapping, s, x)
if sfGenSym in s.flags:
result.add newIdentNode(getIdent(c.ic, x.name.s & "`gensym" & $c.instID),
# `__gensym` would also be an option, but would need patching
# `nep1CheckDefImpl` and identifier comparison.
# `:` is similar to `genPrefix` (we could also reuse it)
result.add newIdentNode(getIdent(c.ic, x.name.s & ":gensym" & $c.instID),
if c.instLines: actual.info else: templ.info)
else:
result.add newSymNode(x, if c.instLines: actual.info else: templ.info)
Expand Down