diff options
author | Araq <rumpf_a@web.de> | 2014-09-10 20:34:33 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-09-10 20:34:33 +0200 |
commit | 22fb9db8459063def6e04259f6222affec177c5c (patch) | |
tree | b0554b2ded24a9a695a476e66af218c95f6b1d13 /compiler | |
parent | c5dbcb548fe5b005594d3e6d1c266d3ec7eb13a2 (diff) | |
download | Nim-22fb9db8459063def6e04259f6222affec177c5c.tar.gz |
nimfix improvements
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/condsyms.nim | 2 | ||||
-rw-r--r-- | compiler/pretty.nim | 2 | ||||
-rw-r--r-- | compiler/prettybase.nim | 2 | ||||
-rw-r--r-- | compiler/semexprs.nim | 2 | ||||
-rw-r--r-- | compiler/semtempl.nim | 6 |
5 files changed, 6 insertions, 8 deletions
diff --git a/compiler/condsyms.nim b/compiler/condsyms.nim index 938cc5df2..d87275063 100644 --- a/compiler/condsyms.nim +++ b/compiler/condsyms.nim @@ -60,7 +60,7 @@ const quick release debug useWinAnsi useFork useNimRtl useMalloc useRealtimeGC ssl memProfiler - nodejs kwin + nodejs kwin nimfix usesysassert usegcassert tinyC useFFI useStdoutAsStdmsg createNimRtl diff --git a/compiler/pretty.nim b/compiler/pretty.nim index d6b593318..9f2074a0b 100644 --- a/compiler/pretty.nim +++ b/compiler/pretty.nim @@ -137,4 +137,4 @@ proc styleCheckUse*(info: TLineInfo; s: PSym) = var x = line.substr(0, first-1) & newName & line.substr(last+1) system.shallowCopy(gSourceFiles[info.fileIndex].lines[info.line-1], x) gSourceFiles[info.fileIndex].dirty = true - if newName == "File": writeStackTrace() + #if newName == "File": writeStackTrace() diff --git a/compiler/prettybase.nim b/compiler/prettybase.nim index e2679f456..21613396a 100644 --- a/compiler/prettybase.nim +++ b/compiler/prettybase.nim @@ -74,7 +74,7 @@ proc replaceDeprecated*(info: TLineInfo; oldSym, newSym: PIdent) = var x = line.substr(0, first-1) & newSym.s & line.substr(last+1) system.shallowCopy(gSourceFiles[info.fileIndex].lines[info.line-1], x) gSourceFiles[info.fileIndex].dirty = true - if newSym.s == "File": writeStackTrace() + #if newSym.s == "File": writeStackTrace() proc replaceDeprecated*(info: TLineInfo; oldSym, newSym: PSym) = replaceDeprecated(info, oldSym.name, newSym.name) diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 0034c3718..11215ae68 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -1059,7 +1059,7 @@ proc builtinFieldAccess(c: PContext, n: PNode, flags: TExprFlags): PNode = f = getSymFromList(ty.n, i) if f != nil: markUsed(n.sons[1].info, f) - styleCheckUse(n.sons[1].info, s) + styleCheckUse(n.sons[1].info, f) n.sons[0] = makeDeref(n.sons[0]) n.sons[1] = newSymNode(f) n.typ = f.typ diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim index adb2c9009..0a647a65d 100644 --- a/compiler/semtempl.nim +++ b/compiler/semtempl.nim @@ -191,6 +191,8 @@ proc addLocalDecl(c: var TemplCtx, n: var PNode, k: TSymKind) = proc semTemplSymbol(c: PContext, n: PNode, s: PSym): PNode = incl(s.flags, sfUsed) + # we do not call styleCheckUse here, as the identifier is not really + # resolved here. We will fixup the used identifiers later. case s.kind of skUnknown: # Introduced in this pass! Leave it as an identifier. @@ -199,19 +201,15 @@ proc semTemplSymbol(c: PContext, n: PNode, s: PSym): PNode = result = symChoice(c, n, s, scOpen) of skGenericParam: result = newSymNodeTypeDesc(s, n.info) - styleCheckUse(n.info, s) of skParam: result = n - styleCheckUse(n.info, s) of skType: if (s.typ != nil) and (s.typ.kind != tyGenericParam): result = newSymNodeTypeDesc(s, n.info) else: result = n - styleCheckUse(n.info, s) else: result = newSymNode(s, n.info) - styleCheckUse(n.info, s) proc semRoutineInTemplName(c: var TemplCtx, n: PNode): PNode = result = n |