fix #2844 #3911; add --spellsuggest to suggest symbols in scope with similar spellings on undefined symbol error (#16067)
* add --spellsuggest to suggest symbols in scope with similar spellings on undefined symbol errors * implement --spellsuggest with 0 arguments
This commit is contained in:
parent
d5eb658034
commit
48eab5370a
9 changed files with 178 additions and 32 deletions
|
|
@ -863,6 +863,10 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
|
|||
processOnOffSwitchG(conf, {optStdout}, arg, pass, info)
|
||||
of "listfullpaths":
|
||||
processOnOffSwitchG(conf, {optListFullPaths}, arg, pass, info)
|
||||
of "spellsuggest":
|
||||
if arg.len == 0: conf.spellSuggestMax = spellSuggestSecretSauce
|
||||
elif arg == "auto": conf.spellSuggestMax = spellSuggestSecretSauce
|
||||
else: conf.spellSuggestMax = parseInt(arg)
|
||||
of "declaredlocs":
|
||||
processOnOffSwitchG(conf, {optDeclaredLocs}, arg, pass, info)
|
||||
of "dynliboverride":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue