diff options
author | Clyybber <darkmine956@gmail.com> | 2019-09-09 11:54:15 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-09-09 11:54:15 +0200 |
commit | ed1d41c51e5b3772fdea9e08733dbf46dfb4428e (patch) | |
tree | 48add0b4f759aad5f212894000424df82751eeaa /compiler/sempass2.nim | |
parent | aa95ae6af93e04c5465d76347ab2150bf13d9669 (diff) | |
download | Nim-ed1d41c51e5b3772fdea9e08733dbf46dfb4428e.tar.gz |
Small ast.nim cleanup (#12156)
* Remove sonsLen * Use Indexable
Diffstat (limited to 'compiler/sempass2.nim')
-rw-r--r-- | compiler/sempass2.nim | 6 |
1 files changed, 3 insertions, 3 deletions
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: |