mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-27 17:53:58 +00:00
Fix typo. Remove unnecessary proc
This commit is contained in:
@@ -122,13 +122,6 @@ proc splitSwitch(switch: string, cmd, arg: var string, pass: TCmdLinePass,
|
||||
elif switch[i] in {':', '=', '['}: arg = substr(switch, i + 1)
|
||||
else: invalidCmdLineOption(pass, switch, info)
|
||||
|
||||
proc hasKeyValuePair(arg: string): bool =
|
||||
for i in 0..arg.high:
|
||||
if arg[i] in {':', '='}:
|
||||
return true
|
||||
|
||||
return false
|
||||
|
||||
proc processOnOffSwitch(op: TOptions, arg: string, pass: TCmdLinePass,
|
||||
info: TLineInfo) =
|
||||
case whichKeyword(arg)
|
||||
@@ -349,7 +342,7 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo) =
|
||||
discard "allow for backwards compatibility, but don't do anything"
|
||||
of "define", "d":
|
||||
expectArg(switch, arg, pass, info)
|
||||
if hasKeyValuePair(arg):
|
||||
if {':', '='} in arg:
|
||||
splitSwitch(arg, key, val, pass, info)
|
||||
defineSymbol(key, val)
|
||||
else:
|
||||
|
||||
@@ -902,7 +902,7 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: int,
|
||||
of wIntDefine:
|
||||
sym.magic = mIntDefine
|
||||
of wStrDefine:
|
||||
sym.magic = mIntDefine
|
||||
sym.magic = mStrDefine
|
||||
else: invalidPragma(it)
|
||||
else: invalidPragma(it)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user