diff options
author | Charles Blake <cblake@csail.mit.edu> | 2015-02-13 08:42:41 -0500 |
---|---|---|
committer | Charles Blake <cblake@csail.mit.edu> | 2015-02-13 08:42:41 -0500 |
commit | 45a2c1b1d1f18aedeb363b9ef41f9f73b028b581 (patch) | |
tree | 013013b3371756fafba5e1797d3fb2491faf45a1 /compiler/commands.nim | |
parent | 0a1bc0e9cd30ef1a3654e7637795ed22010e7977 (diff) | |
parent | 199707c189a169c4bf0b00f09775c9b7fa9343f3 (diff) | |
download | Nim-45a2c1b1d1f18aedeb363b9ef41f9f73b028b581.tar.gz |
Merge ../Nim into devel; track ttables.nim delete.
Diffstat (limited to 'compiler/commands.nim')
-rw-r--r-- | compiler/commands.nim | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim index c81b81d19..c52515c76 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -141,7 +141,7 @@ proc expectNoArg(switch, arg: string, pass: TCmdLinePass, info: TLineInfo) = if arg != "": localError(info, errCmdLineNoArgExpected, addPrefix(switch)) proc processSpecificNote(arg: string, state: TSpecialWord, pass: TCmdLinePass, - info: TLineInfo) = + info: TLineInfo; orig: string) = var id = "" # arg = "X]:on|off" var i = 0 var n = hintMin @@ -149,17 +149,17 @@ proc processSpecificNote(arg: string, state: TSpecialWord, pass: TCmdLinePass, add(id, arg[i]) inc(i) if i < len(arg) and (arg[i] == ']'): inc(i) - else: invalidCmdLineOption(pass, arg, info) + else: invalidCmdLineOption(pass, orig, info) if i < len(arg) and (arg[i] in {':', '='}): inc(i) - else: invalidCmdLineOption(pass, arg, info) - if state == wHint: + else: invalidCmdLineOption(pass, orig, info) + if state == wHint: var x = findStr(msgs.HintsToStr, id) if x >= 0: n = TNoteKind(x + ord(hintMin)) - else: invalidCmdLineOption(pass, arg, info) - else: + else: localError(info, "unknown hint: " & id) + else: var x = findStr(msgs.WarningsToStr, id) if x >= 0: n = TNoteKind(x + ord(warnMin)) - else: invalidCmdLineOption(pass, arg, info) + else: localError(info, "unknown warning: " & id) case whichKeyword(substr(arg, i)) of wOn: incl(gNotes, n) of wOff: excl(gNotes, n) @@ -368,8 +368,8 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo) = defineSymbol("nogc") else: localError(info, errNoneBoehmRefcExpectedButXFound, arg) of "warnings", "w": processOnOffSwitch({optWarns}, arg, pass, info) - of "warning": processSpecificNote(arg, wWarning, pass, info) - of "hint": processSpecificNote(arg, wHint, pass, info) + of "warning": processSpecificNote(arg, wWarning, pass, info, switch) + of "hint": processSpecificNote(arg, wHint, pass, info, switch) of "hints": processOnOffSwitch({optHints}, arg, pass, info) of "threadanalysis": processOnOffSwitchG({optThreadAnalysis}, arg, pass, info) of "stacktrace": processOnOffSwitch({optStackTrace}, arg, pass, info) |