Add ability to get a define value
This commit is contained in:
parent
00941e8925
commit
316a56107a
1 changed files with 5 additions and 0 deletions
|
|
@ -59,6 +59,11 @@ macro isDefined*(def: untyped): untyped =
|
|||
false
|
||||
)
|
||||
|
||||
macro getDefine*(def: untyped): untyped =
|
||||
if gDefines.hasKey(def.strVal()):
|
||||
return newStrLitNode(gDefines[def.strVal()])
|
||||
return newStrLitNode("")
|
||||
|
||||
proc getDynlibExt(): string =
|
||||
when defined(Windows):
|
||||
result = "[0-9.\\-]*\\.dll"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue