summary refs log tree commit diff stats
path: root/rod/ast.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-01-05 23:46:50 +0100
committerAraq <rumpf_a@web.de>2011-01-05 23:46:50 +0100
commit5635fde06024b00bb874126bea208f07b4b8db9d (patch)
treee54cbee31f63078f125574b52e763ce883f07c22 /rod/ast.nim
parent63ac32e6de018b5e175efb6f61675bfe36394973 (diff)
downloadNim-5635fde06024b00bb874126bea208f07b4b8db9d.tar.gz
transf: big refactoring; other small fixes
Diffstat (limited to 'rod/ast.nim')
-rwxr-xr-xrod/ast.nim6
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) = 
;id=d24e4712a45e03d79fa1ccb71d00c5b830d5a305'>d24e471 ^
b5d5e0d ^
1265d9c ^

b5d5e0d ^
d24e471 ^


b5d5e0d ^
d24e471 ^
6394e38 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33