From 12ad32e951374c31ff951c8023ef683f454277bc Mon Sep 17 00:00:00 2001 From: def Date: Wed, 4 Feb 2015 13:01:11 +0100 Subject: Typos --- compiler/nimconf.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/nimconf.nim') diff --git a/compiler/nimconf.nim b/compiler/nimconf.nim index bcf9b5359..cd1fa784f 100644 --- a/compiler/nimconf.nim +++ b/compiler/nimconf.nim @@ -14,7 +14,7 @@ import options, idents, wordrecg # ---------------- 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 @@ -157,7 +157,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 -- cgit 1.4.1-2-gfad0 From 2b9d7068cbb38fd9281dde00936eac6d48fe91b1 Mon Sep 17 00:00:00 2001 From: def Date: Wed, 4 Feb 2015 13:01:21 +0100 Subject: Add support for nimcfg and warning for nimrod.cfg --- compiler/nimconf.nim | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'compiler/nimconf.nim') diff --git a/compiler/nimconf.nim b/compiler/nimconf.nim index cd1fa784f..5304dc265 100644 --- a/compiler/nimconf.nim +++ b/compiler/nimconf.nim @@ -246,6 +246,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) -- cgit 1.4.1-2-gfad0