summary refs log tree commit diff stats
path: root/compiler/pragmas.nim
diff options
context:
space:
mode:
authorOscar NihlgÄrd <oscarnihlgard@gmail.com>2019-02-03 09:06:00 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-02-03 09:06:00 +0100
commit0091f2ad3bfa57aa1d5bdd1a1062975135a2a6d9 (patch)
tree1760f6fc1779cfcf01634109f78df3606baf53ba /compiler/pragmas.nim
parent07553034de5bd9ffa89df303bf789664f9cb8ed8 (diff)
downloadNim-0091f2ad3bfa57aa1d5bdd1a1062975135a2a6d9.tar.gz
Implement {.booldefine.} (#10533)
Diffstat (limited to 'compiler/pragmas.nim')
-rw-r--r--compiler/pragmas.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim
index 3967fa22d..03c9127af 100644
--- a/compiler/pragmas.nim
+++ b/compiler/pragmas.nim
@@ -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)