From ed1d41c51e5b3772fdea9e08733dbf46dfb4428e Mon Sep 17 00:00:00 2001 From: Clyybber Date: Mon, 9 Sep 2019 11:54:15 +0200 Subject: Small ast.nim cleanup (#12156) * Remove sonsLen * Use Indexable --- compiler/sempass2.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'compiler/sempass2.nim') diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim index c31f86f98..9957e772e 100644 --- a/compiler/sempass2.nim +++ b/compiler/sempass2.nim @@ -380,7 +380,7 @@ proc trackTryStmt(tracked: PEffects, n: PNode) = # Collect the exceptions caught by the except branches for i in 1 ..< n.len: let b = n.sons[i] - let blen = sonsLen(b) + let blen = len(b) if b.kind == nkExceptBranch: inc branches if blen == 1: @@ -398,7 +398,7 @@ proc trackTryStmt(tracked: PEffects, n: PNode) = # Add any other exception raised in the except bodies for i in 1 ..< n.len: let b = n.sons[i] - let blen = sonsLen(b) + let blen = len(b) if b.kind == nkExceptBranch: setLen(tracked.init, oldState) track(tracked, b.sons[blen-1]) @@ -430,7 +430,7 @@ proc isForwardedProc(n: PNode): bool = result = n.kind == nkSym and sfForward in n.sym.flags proc trackPragmaStmt(tracked: PEffects, n: PNode) = - for i in 0 ..< sonsLen(n): + for i in 0 ..< len(n): var it = n.sons[i] if whichPragma(it) == wEffects: # list the computed effects up to here: -- cgit 1.4.1-2-gfad0 im?h=devel&id=10c1d7f519ad2dc5b971449a21052c50ef98757f'>blame commit diff stats
path: root/compiler/nimblecmd.nim
blob: 23f3331a23fc3df8d7f815216836934b423cef5a (plain) (tree)
1
2
3
4
5
6
7
8
9