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

@ -151,10 +151,24 @@ proc processModule(module: PSym, filename: string, stream: PLLStream,
s = stream
while true:
openParsers(p, filename, s)
if sfSystemModule notin module.flags:
template processImplicits(implicits, nodeKind: expr): stmt =
for module in items(implicits):
var importStmt = newNodeI(nodeKind, gCmdLineInfo)
var str = newStrNode(nkStrLit, module)
str.info = gCmdLineInfo
importStmt.addSon str
processTopLevelStmt importStmt, a
processImplicits implicitImports, nkImportStmt
processImplicits implicitIncludes, nkIncludeStmt
while true:
var n = parseTopLevelStmt(p)
if n.kind == nkEmpty: break
processTopLevelStmt(n, a)
closeParsers(p)
if s.kind != llsStdIn: break
closePasses(a)