code cleanup: remove newScopeForIf switch

This commit is contained in:
Andreas Rumpf 2018-07-04 20:04:08 +02:00
commit db35ac435b
5 changed files with 4 additions and 78 deletions

View file

@ -340,9 +340,8 @@ proc semTemplBody(c: var TemplCtx, n: PNode): PNode =
for i in countup(0, sonsLen(n)-1):
var it = n.sons[i]
if it.len == 2:
when newScopeForIf: openScope(c)
openScope(c)
it.sons[0] = semTemplBody(c, it.sons[0])
when not newScopeForIf: openScope(c)
it.sons[1] = semTemplBody(c, it.sons[1])
closeScope(c)
else: