summary refs log tree commit diff stats
path: root/compiler/sempass2.nim
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2019-09-09 11:54:15 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-09-09 11:54:15 +0200
commited1d41c51e5b3772fdea9e08733dbf46dfb4428e (patch)
tree48add0b4f759aad5f212894000424df82751eeaa /compiler/sempass2.nim
parentaa95ae6af93e04c5465d76347ab2150bf13d9669 (diff)
downloadNim-ed1d41c51e5b3772fdea9e08733dbf46dfb4428e.tar.gz
Small ast.nim cleanup (#12156)
* Remove sonsLen
* Use Indexable
Diffstat (limited to 'compiler/sempass2.nim')
-rw-r--r--compiler/sempass2.nim6
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: