mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-03 02:18:00 +00:00
add nimHasWarningX and nimHasHintX defines for feature detection purposes
This commit is contained in:
@@ -13,6 +13,7 @@ import
|
||||
strtabs, platform, strutils, idents
|
||||
|
||||
from options import Feature
|
||||
from lineinfos import HintsToStr, WarningsToStr
|
||||
|
||||
const
|
||||
catNone = "false"
|
||||
@@ -83,3 +84,8 @@ proc initDefines*(symbols: StringTableRef) =
|
||||
defineSymbol("nimHasNilSeqs")
|
||||
for f in low(Feature)..high(Feature):
|
||||
defineSymbol("nimHas" & $f)
|
||||
|
||||
for s in WarningsToStr:
|
||||
defineSymbol("nimHasWarning" & s)
|
||||
for s in HintsToStr:
|
||||
defineSymbol("nimHasHint" & s)
|
||||
|
||||
Reference in New Issue
Block a user