it's spelt callsite

This commit is contained in:
Andreas Rumpf
2019-02-22 18:28:40 +01:00
parent 4fb73e6d8f
commit 15c208cd29
3 changed files with 5 additions and 4 deletions

View File

@@ -271,7 +271,7 @@ type
# language; for interfacing with Objective C
sfDiscardable, # returned value may be discarded implicitly
sfOverriden, # proc is overriden
sfCallSideLineinfo# A flag for template symbols to tell the
sfCallsite # A flag for template symbols to tell the
# compiler it should use line information from
# the calling side of the macro, not from the
# implementation.

View File

@@ -186,7 +186,7 @@ proc evalTemplate*(n: PNode, tmpl, genSymOwner: PSym;
renderTree(result, {renderNoComments}))
else:
result = copyNode(body)
ctx.instLines = sfCallSideLineinfo in tmpl.flags
ctx.instLines = sfCallsite in tmpl.flags
if ctx.instLines:
result.info = n.info
for i in countup(0, safeLen(body) - 1):

View File

@@ -559,8 +559,9 @@ proc semTemplateDef(c: PContext, n: PNode): PNode =
else:
s = semIdentVis(c, skTemplate, n.sons[0], {})
if s.owner != nil and s.owner.name.s == "system" and s.name.s in ["!=", ">=", ">", "incl", "excl", "in", "notin", "isnot"]:
incl(s.flags, sfCallSideLineinfo)
if s.owner != nil and sfSystemModule in s.owner.flags and
s.name.s in ["!=", ">=", ">", "incl", "excl", "in", "notin", "isnot"]:
incl(s.flags, sfCallsite)
styleCheckDef(c.config, s)
onDef(n[0].info, s)