linter: refactorings

This commit is contained in:
Araq 2019-07-10 09:07:03 +02:00
commit 18182e4bfd
3 changed files with 40 additions and 55 deletions

View file

@ -778,7 +778,7 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int,
let k = whichKeyword(ident)
if k in validPragmas:
if {optStyleHint, optStyleError} * c.config.globalOptions != {}:
checkPragmaUse(c.config, key.info, ident.s)
checkPragmaUse(c.config, key.info, k, ident.s)
case k
of wExportc:
makeExternExport(c, sym, getOptionalStr(c, it, "$1"), it.info)