perform a fixpoint iteration for proper Nimscript support

This commit is contained in:
Andreas Rumpf 2015-12-21 16:07:07 +01:00
commit beb0ccda39

View file

@ -1021,7 +1021,10 @@ proc doAction(options: Options) =
# re-read it from the compiler. # re-read it from the compiler.
# TODO: It doesn't appear that this actually happens, can we just remove this? # TODO: It doesn't appear that this actually happens, can we just remove this?
var command = compiler_options.command.parseActionType() var command = compiler_options.command.parseActionType()
var doLoop = true
while doLoop:
doLoop = false
let cmd = compiler_options.command.normalize
case command case command
of actionUpdate: of actionUpdate:
update(options) update(options)
@ -1047,8 +1050,11 @@ proc doAction(options: Options) =
publish(pkgInfo) publish(pkgInfo)
of actionDump: of actionDump:
dump(options) dump(options)
of actionNil, actionCustom: of actionNil: discard "assuming nimscript 'nop' command here"
assert false of actionCustom:
# calls Nimscript as a side effect :-/
discard getPkgInfo(getCurrentDir())
doLoop = cmd != compiler_options.command.normalize
when isMainModule: when isMainModule:
when defined(release): when defined(release):