diff --git a/Nim/NimQml/NimQmlMacros.nim b/Nim/NimQml/NimQmlMacros.nim index 4cf4177..c89bf01 100644 --- a/Nim/NimQml/NimQmlMacros.nim +++ b/Nim/NimQml/NimQmlMacros.nim @@ -5,6 +5,14 @@ import strutils import typetraits import tables +template debug(body: stmt): stmt = + {.push warning[user]: off.} + when defined(debug): + {.pop.} + body + else: + {.pop.} + # these are defined in a template to work around a compiler bug # with {.compileTime.}/static variables not being "computable at # compile time" when a macro using them is imported into another @@ -30,7 +38,7 @@ proc getNodeOf*(tree: PNimrodNode, kind: TNimrodNodeKind): PNimrodNode {.compile ## Returnsthe first node that satisfies this condition for i in 0..