From d0d9a0639576e511c5fb6fbd9206ec927d5962a0 Mon Sep 17 00:00:00 2001 From: Filippo Cucchetto Date: Sun, 26 Apr 2015 17:15:44 +0200 Subject: [PATCH] [NimQml] Some renaming fixes for making NimQml work with 0.10.3 Renamed the PNimrodNode to NimNode Renamed the TNimrodNodeKind to NimNodeKind Fixed a a template by making it dirty --- Nim/NimQml/NimQmlMacros.nim | 82 ++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/Nim/NimQml/NimQmlMacros.nim b/Nim/NimQml/NimQmlMacros.nim index fe6fc39..8a8bba8 100644 --- a/Nim/NimQml/NimQmlMacros.nim +++ b/Nim/NimQml/NimQmlMacros.nim @@ -31,9 +31,9 @@ let nim2QtMeta {.compileTime.} = { "" : "Void", # no return, which is represented by an nnkEmpty node }.toTable -proc getNodeOf*(tree: PNimrodNode, kind: TNimrodNodeKind): PNimrodNode {.compileTime.} = +proc getNodeOf*(tree: NimNode, kind: NimNodeKind): NimNode {.compileTime.} = ## recursively looks for a node of kind, ``kind``, in the tree provided as ``tree`` - ## Returnsthe first node that satisfies this condition + ## Returns the first node that satisfies this condition for i in 0.. 2: # more args than just type @@ -238,19 +238,19 @@ template prototypeOnSlotCalled(typ: expr): stmt {.dirty.} = procCall onSlotCalled(super, slotName, args) #FIXME: changed parent, typ from typedesc to expr to workaround Nim issue #1874 -template prototypeCreate(typ: expr): stmt = +template prototypeCreate(typ: expr): stmt {.dirty.}= proc create*(myQObject: var typ) = var super = (typ.superType())(myQObject) procCall create(super) -proc doRemoveOpenSym(a: var PNimrodNode): PNimrodNode {.compileTime.} = +proc doRemoveOpenSym(a: var NimNode): NimNode {.compileTime.} = hookOnNode(NullContext(),a, removeOpenSym, true) -proc templateBody*(a: PNimrodNode): PNimrodNode {.compileTime.} = +proc templateBody*(a: NimNode): NimNode {.compileTime.} = expectKind a, nnkTemplateDef result = a[6] -proc genArgTypeArray(params: PNimrodNode): PNimrodNode {.compileTime.} = +proc genArgTypeArray(params: NimNode): NimNode {.compileTime.} = expectKind params, nnkFormalParams result = newNimNode(nnkBracket) for i in 0 ..