## Contains helper macros for NimQml import macros import strutils import typetraits import tables template debug(body: stmt): stmt = {.push warning[user]: off.} when defined(debug): {.pop.} body else: {.pop.} let nimFromQtVariant {.compileTime.} = { "int" : "intVal", "string" : "stringVal", "bool" : "boolVal", }.toTable let nim2QtMeta {.compileTime.} = { "bool": "Bool", "int " : "Int", "string" : "QString", "pointer" : "VoidStar", "QVariant": "QVariant", "" : "Void", # no return, which is represented by an nnkEmpty node }.toTable proc getNodeOf*(tree: PNimrodNode, kind: TNimrodNodeKind): PNimrodNode {.compileTime.} = ## recursively looks for a node of kind, ``kind``, in the tree provided as ``tree`` ## Returnsthe first node that satisfies this condition for i in 0.. 2: # more args than just type for i in 2..