implements a --nep1:on switch to make the compiler enforce the naming conventions outlined in NEP-1

This commit is contained in:
Andreas Rumpf
2018-06-13 01:44:19 +02:00
parent f555338ce8
commit 5348fef003
13 changed files with 58 additions and 46 deletions

View File

@@ -2161,7 +2161,7 @@ proc semBlock(c: PContext, n: PNode): PNode =
addDecl(c, labl)
n.sons[0] = newSymNode(labl, n.sons[0].info)
suggestSym(c.config, n.sons[0].info, labl, c.graph.usageSym)
styleCheckDef(labl)
styleCheckDef(c.config, labl)
n.sons[1] = semExpr(c, n.sons[1])
n.typ = n.sons[1].typ
if isEmptyType(n.typ): n.kind = nkBlockStmt