Merge pull request #2058 from def-/nimrod-cfgs
Rename *.nimrod.cfg to *.nim.cfg
This commit is contained in:
commit
31074e0015
10 changed files with 11 additions and 6 deletions
|
|
@ -460,7 +460,7 @@ type
|
||||||
|
|
||||||
TLineInfo*{.final.} = object # This is designed to be as small as possible,
|
TLineInfo*{.final.} = object # This is designed to be as small as possible,
|
||||||
# because it is used
|
# 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.
|
# two int16 and an int32.
|
||||||
# On 64 bit and on 32 bit systems this is
|
# On 64 bit and on 32 bit systems this is
|
||||||
# only 8 bytes.
|
# only 8 bytes.
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import
|
||||||
options, idents, wordrecg, strtabs
|
options, idents, wordrecg, strtabs
|
||||||
|
|
||||||
# ---------------- configuration file parser -----------------------------
|
# ---------------- 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) =
|
proc ppGetTok(L: var TLexer, tok: var TToken) =
|
||||||
# simple filter
|
# simple filter
|
||||||
|
|
@ -158,7 +158,7 @@ proc checkSymbol(L: TLexer, tok: TToken) =
|
||||||
proc parseAssignment(L: var TLexer, tok: var TToken) =
|
proc parseAssignment(L: var TLexer, tok: var TToken) =
|
||||||
if tok.ident.id == getIdent("-").id or tok.ident.id == getIdent("--").id:
|
if tok.ident.id == getIdent("-").id or tok.ident.id == getIdent("--").id:
|
||||||
confTok(L, tok) # skip unnecessary prefix
|
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)
|
checkSymbol(L, tok)
|
||||||
var s = tokToStr(tok)
|
var s = tokToStr(tok)
|
||||||
confTok(L, tok) # skip symbol
|
confTok(L, tok) # skip symbol
|
||||||
|
|
@ -252,6 +252,11 @@ proc loadConfigs*(cfg: string) =
|
||||||
|
|
||||||
if gProjectName.len != 0:
|
if gProjectName.len != 0:
|
||||||
# new project wide config file:
|
# new project wide config file:
|
||||||
let projectConfig = changeFileExt(gProjectFull, "nim.cfg")
|
var projectConfig = changeFileExt(gProjectFull, "nimcfg")
|
||||||
if fileExists(projectConfig): readConfigFile(projectConfig)
|
if not fileExists(projectConfig):
|
||||||
else: readConfigFile(changeFileExt(gProjectFull, "nimrod.cfg"))
|
projectConfig = changeFileExt(gProjectFull, "nim.cfg")
|
||||||
|
if not fileExists(projectConfig):
|
||||||
|
projectConfig = changeFileExt(gProjectFull, "nimrod.cfg")
|
||||||
|
if fileExists(projectConfig):
|
||||||
|
rawMessage(warnDeprecated, projectConfig)
|
||||||
|
readConfigFile(projectConfig)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue