diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-06-13 01:44:19 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-06-13 01:44:19 +0200 |
commit | 5348fef00326aabbb596b2ee7d0925fe10bbf7c6 (patch) | |
tree | 5476af33306aa2d20b1a009e63664d11b6cea9ca /compiler/semtempl.nim | |
parent | f555338ce8b4053bec48ee2ba8299a757db1ee67 (diff) | |
download | Nim-5348fef00326aabbb596b2ee7d0925fe10bbf7c6.tar.gz |
implements a --nep1:on switch to make the compiler enforce the naming conventions outlined in NEP-1
Diffstat (limited to 'compiler/semtempl.nim')
-rw-r--r-- | compiler/semtempl.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim index 086d09091..75c6bc4bb 100644 --- a/compiler/semtempl.nim +++ b/compiler/semtempl.nim @@ -213,7 +213,7 @@ proc addLocalDecl(c: var TemplCtx, n: var PNode, k: TSymKind) = else: let local = newGenSym(k, ident, c) addPrelimDecl(c.c, local) - styleCheckDef(n.info, local) + styleCheckDef(c.c.config, n.info, local) replaceIdentBySym(c.c, n, newSymNode(local, n.info)) else: replaceIdentBySym(c.c, n, ident) @@ -260,7 +260,7 @@ proc semRoutineInTemplBody(c: var TemplCtx, n: PNode, k: TSymKind): PNode = var s = newGenSym(k, ident, c) s.ast = n addPrelimDecl(c.c, s) - styleCheckDef(n.info, s) + styleCheckDef(c.c.config, n.info, s) n.sons[namePos] = newSymNode(s, n.sons[namePos].info) else: n.sons[namePos] = ident @@ -382,7 +382,7 @@ proc semTemplBody(c: var TemplCtx, n: PNode): PNode = # labels are always 'gensym'ed: let s = newGenSym(skLabel, n.sons[0], c) addPrelimDecl(c.c, s) - styleCheckDef(s) + styleCheckDef(c.c.config, s) n.sons[0] = newSymNode(s, n.sons[0].info) n.sons[1] = semTemplBody(c, n.sons[1]) closeScope(c) @@ -551,7 +551,7 @@ proc semTemplateDef(c: PContext, n: PNode): PNode = incl(s.flags, sfGlobal) else: s = semIdentVis(c, skTemplate, n.sons[0], {}) - styleCheckDef(s) + styleCheckDef(c.config, s) # check parameter list: #s.scope = c.currentScope pushOwner(c, s) |