mirror of
https://github.com/status-im/nim-stew.git
synced 2025-01-09 11:45:42 +00:00
Fix for using typedParams with nnkMacroDef procs
This commit is contained in:
parent
b909465eb8
commit
1a9ee7397d
@ -227,8 +227,9 @@ proc newLitFixed*(arg: tuple): NimNode {.compileTime.} =
|
|||||||
result.add nnkExprColonExpr.newTree(newIdentNode(a), newLitFixed(b))
|
result.add nnkExprColonExpr.newTree(newIdentNode(a), newLitFixed(b))
|
||||||
|
|
||||||
iterator typedParams*(n: NimNode, skip = 0): (NimNode, NimNode) =
|
iterator typedParams*(n: NimNode, skip = 0): (NimNode, NimNode) =
|
||||||
for i in (1 + skip) ..< n.params.len:
|
let params = n[3]
|
||||||
let paramNodes = n.params[i]
|
for i in (1 + skip) ..< params.len:
|
||||||
|
let paramNodes = params[i]
|
||||||
let paramType = paramNodes[^2]
|
let paramType = paramNodes[^2]
|
||||||
|
|
||||||
for j in 0 ..< paramNodes.len - 2:
|
for j in 0 ..< paramNodes.len - 2:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user