diff options
author | Araq <rumpf_a@web.de> | 2011-01-05 23:46:50 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-01-05 23:46:50 +0100 |
commit | 5635fde06024b00bb874126bea208f07b4b8db9d (patch) | |
tree | e54cbee31f63078f125574b52e763ce883f07c22 /rod/ast.nim | |
parent | 63ac32e6de018b5e175efb6f61675bfe36394973 (diff) | |
download | Nim-5635fde06024b00bb874126bea208f07b4b8db9d.tar.gz |
transf: big refactoring; other small fixes
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) = |