diff options
Diffstat (limited to 'rod/ast.nim')
-rwxr-xr-x | rod/ast.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rod/ast.nim b/rod/ast.nim index f63bba43a..4b16078fc 100755 --- a/rod/ast.nim +++ b/rod/ast.nim @@ -955,9 +955,9 @@ proc hasSubnodeWith(n: PNode, kind: TNodeKind): bool = of nkEmpty..nkNilLit: result = n.kind == kind else: for i in countup(0, sonsLen(n) - 1): - if (n.sons[i] != nil) and (n.sons[i].kind == kind) or - hasSubnodeWith(n.sons[i], kind): - return true + if n.sons[i] != nil: + if (n.sons[i].kind == kind) or hasSubnodeWith(n.sons[i], kind): + return true result = false proc replaceSons(n: PNode, oldKind, newKind: TNodeKind) = |