diff options
Diffstat (limited to 'compiler/commands.nim')
-rw-r--r-- | compiler/commands.nim | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim index 39967c4bc..b39cc0b72 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -115,6 +115,7 @@ const errInvalidCmdLineOption = "invalid command line option: '$1'" errOnOrOffExpectedButXFound = "'on' or 'off' expected, but '$1' found" errOnOffOrListExpectedButXFound = "'on', 'off' or 'list' expected, but '$1' found" + errOffHintsError = "'off', 'hint' or 'error' expected, but '$1' found" proc invalidCmdLineOption(conf: ConfigRef; pass: TCmdLinePass, switch: string, info: TLineInfo) = if switch == " ": localError(conf, info, errInvalidCmdLineOption % "-") @@ -732,8 +733,12 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo; doAssert(conf != nil) incl(conf.features, destructor) defineSymbol(conf.symbols, "nimNewRuntime") - of "nep1": - processOnOffSwitchG(conf, {optCheckNep1}, arg, pass, info) + of "stylecheck": + case arg.normalize + of "off": conf.globalOptions = conf.globalOptions - {optStyleHint, optStyleError} + of "hint": conf.globalOptions = conf.globalOptions + {optStyleHint} + of "error": conf.globalOptions = conf.globalOptions + {optStyleError} + else: localError(conf, info, errOffHintsError % arg) of "cppcompiletonamespace": if arg.len > 0: conf.cppCustomNamespace = arg |