New algorithm for locating and loading nimrod config files.

Some new options added to the compiler (see news.txt for details)
This commit is contained in:
Zahary Karadjov 2011-11-25 17:19:01 +02:00
commit c617479c68
14 changed files with 587 additions and 389 deletions

View file

@ -377,7 +377,7 @@ const
warnMax* = pred(hintSuccess)
hintMin* = hintSuccess
hintMax* = high(TMsgKind)
type
TNoteKind* = range[warnMin..hintMax] # "notes" are warnings or hints
TNoteKinds* = set[TNoteKind]
@ -392,6 +392,7 @@ type
ERecoverableError* = object of EInvalidValue
proc newLineInfo*(filename: string, line, col: int): TLineInfo
proc raiseRecoverableError*() {.noinline, noreturn.} =
raise newException(ERecoverableError, "")
@ -401,7 +402,7 @@ var
gHintCounter*: int = 0
gWarnCounter*: int = 0
gErrorMax*: int = 1 # stop after gErrorMax errors
# this format is understood by many text editors: it is the same that
# Borland and Freepascal use
const
@ -420,6 +421,7 @@ proc UnknownLineInfo*(): TLineInfo =
var
filenames: seq[tuple[filename: string, fullpath: string]] = @[]
msgContext: seq[TLineInfo] = @[]
gCmdLineInfo* = newLineInfo("command line", -1, -1)
proc pushInfoContext*(info: TLineInfo) =
msgContext.add(info)