diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-12-11 23:07:36 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-12-11 23:07:36 +0100 |
commit | c682671feae3ae6c90416152f84b274cb5aa4a21 (patch) | |
tree | 60e1e7fbb482f09b9b703c50a6bb61a359cdfa73 /compiler | |
parent | 5dc83d0c8fbc966d35494b3f69bcb5eadaa4f7bc (diff) | |
download | Nim-c682671feae3ae6c90416152f84b274cb5aa4a21.tar.gz |
minor cleanups
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/commands.nim | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim index b962e8f39..b090a09a5 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -619,13 +619,12 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo; incl(conf.globalOptions, optRun) of "errormax": expectArg(conf, switch, arg, pass, info) - conf.errorMax = block: - # Note: `nim check` (etc) can overwrite this. - # `0` is meaningless, give it a useful meaning as in clang's -ferror-limit - # If user doesn't set this flag and the code doesn't either, it'd - # have the same effect as errorMax = 1 - let ret = parseInt(arg) - if ret == 0: high(int) else: ret + # Note: `nim check` (etc) can overwrite this. + # `0` is meaningless, give it a useful meaning as in clang's -ferror-limit + # If user doesn't set this flag and the code doesn't either, it'd + # have the same effect as errorMax = 1 + let ret = parseInt(arg) + conf.errorMax = if ret == 0: high(int) else: ret of "verbosity": expectArg(conf, switch, arg, pass, info) let verbosity = parseInt(arg) |