case consistency part 1

This commit is contained in:
Araq 2013-12-27 15:48:53 +01:00
commit 2df9b442c6
88 changed files with 1266 additions and 1144 deletions

View file

@ -380,7 +380,7 @@ proc semTemplBodyDirty(c: var TemplCtx, n: PNode): PNode =
of nkBindStmt:
result = semBindStmt(c.c, n, c.toBind)
of nkEmpty, nkSym..nkNilLit:
nil
discard
else:
# dotExpr is ambiguous: note that we explicitely allow 'x.TemplateParam',
# so we use the generic code for nkDotExpr too
@ -503,7 +503,7 @@ proc semPatternBody(c: var TemplCtx, n: PNode): PNode =
elif templToExpand(s):
result = semPatternBody(c, semTemplateExpr(c.c, n, s, false))
else:
nil
discard
# we keep the ident unbound for matching instantiated symbols and
# more flexibility