diff options
author | Charles Blake <cblake@csail.mit.edu> | 2015-02-07 13:11:27 -0500 |
---|---|---|
committer | Charles Blake <cblake@csail.mit.edu> | 2015-02-07 13:11:27 -0500 |
commit | 11e7c4960eefca0e4c081abe7b0eafbfa7af27b4 (patch) | |
tree | 4726178aec3f2861aa7ac49512d19082020300c5 /compiler | |
parent | 42f8f1cd1fe491c19362a4b03f89952ea6e160bc (diff) | |
parent | b25346719d3726d9b11fcdc64ad07d6da2ad7007 (diff) | |
download | Nim-11e7c4960eefca0e4c081abe7b0eafbfa7af27b4.tar.gz |
Merge /home/cb/pkg/nim/Nim into devel
pull from master
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/msgs.nim | 2 | ||||
-rw-r--r-- | compiler/nim.nim.cfg (renamed from compiler/nim.nimrod.cfg) | 0 | ||||
-rw-r--r-- | compiler/nimconf.nim | 15 |
3 files changed, 11 insertions, 6 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim index 62e6d5281..b58561d30 100644 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -460,7 +460,7 @@ type TLineInfo*{.final.} = object # This is designed to be as small as possible, # because it is used - # in syntax nodes. We safe space here by using + # in syntax nodes. We save space here by using # two int16 and an int32. # On 64 bit and on 32 bit systems this is # only 8 bytes. diff --git a/compiler/nim.nimrod.cfg b/compiler/nim.nim.cfg index f4d8b9dcb..f4d8b9dcb 100644 --- a/compiler/nim.nimrod.cfg +++ b/compiler/nim.nim.cfg diff --git a/compiler/nimconf.nim b/compiler/nimconf.nim index a433bf98e..711b476e6 100644 --- a/compiler/nimconf.nim +++ b/compiler/nimconf.nim @@ -14,7 +14,7 @@ import options, idents, wordrecg, strtabs # ---------------- configuration file parser ----------------------------- -# we use Nim's scanner here to safe space and work +# we use Nim's scanner here to save space and work proc ppGetTok(L: var TLexer, tok: var TToken) = # simple filter @@ -158,7 +158,7 @@ proc checkSymbol(L: TLexer, tok: TToken) = proc parseAssignment(L: var TLexer, tok: var TToken) = if tok.ident.id == getIdent("-").id or tok.ident.id == getIdent("--").id: confTok(L, tok) # skip unnecessary prefix - var info = getLineInfo(L, tok) # safe for later in case of an error + var info = getLineInfo(L, tok) # save for later in case of an error checkSymbol(L, tok) var s = tokToStr(tok) confTok(L, tok) # skip symbol @@ -252,6 +252,11 @@ proc loadConfigs*(cfg: string) = if gProjectName.len != 0: # new project wide config file: - let projectConfig = changeFileExt(gProjectFull, "nim.cfg") - if fileExists(projectConfig): readConfigFile(projectConfig) - else: readConfigFile(changeFileExt(gProjectFull, "nimrod.cfg")) + var projectConfig = changeFileExt(gProjectFull, "nimcfg") + if not fileExists(projectConfig): + projectConfig = changeFileExt(gProjectFull, "nim.cfg") + if not fileExists(projectConfig): + projectConfig = changeFileExt(gProjectFull, "nimrod.cfg") + if fileExists(projectConfig): + rawMessage(warnDeprecated, projectConfig) + readConfigFile(projectConfig) |