Implement {.booldefine.} (#10533)
This commit is contained in:
parent
07553034de
commit
0091f2ad3b
9 changed files with 71 additions and 17 deletions
|
|
@ -67,7 +67,7 @@ const
|
|||
wGensym, wInject, wCodegenDecl, wGuard, wGoto, wExportNims, wUsed}
|
||||
constPragmas* = {wImportc, wExportc, wHeader, wDeprecated, wMagic, wNodecl,
|
||||
wExtern, wImportCpp, wImportObjC, wError, wGensym, wInject, wExportNims,
|
||||
wIntDefine, wStrDefine, wUsed, wCompilerProc, wCore}
|
||||
wIntDefine, wStrDefine, wBoolDefine, wUsed, wCompilerProc, wCore}
|
||||
letPragmas* = varPragmas
|
||||
procTypePragmas* = {FirstCallConv..LastCallConv, wVarargs, wNosideeffect,
|
||||
wThread, wRaises, wLocks, wTags, wGcSafe}
|
||||
|
|
@ -1106,6 +1106,8 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int,
|
|||
sym.magic = mIntDefine
|
||||
of wStrDefine:
|
||||
sym.magic = mStrDefine
|
||||
of wBoolDefine:
|
||||
sym.magic = mBoolDefine
|
||||
of wUsed:
|
||||
noVal(c, it)
|
||||
if sym == nil: invalidPragma(c, it)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue