summary refs log tree commit diff stats
path: root/compiler/pathutils.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-11-21 09:53:16 +0100
committerAraq <rumpf_a@web.de>2018-11-21 11:39:38 +0100
commit6ad5e01160065d2ae79ec305603db46488cc8115 (patch)
tree3c7515d951aba6b7c5b1cdcb615b5648df7d5078 /compiler/pathutils.nim
parent2b2fc5c7e9ecfc828a5cb076f32966dd604c0140 (diff)
downloadNim-6ad5e01160065d2ae79ec305603db46488cc8115.tar.gz
pathutils: remove dead code
Diffstat (limited to 'compiler/pathutils.nim')
-rw-r--r--compiler/pathutils.nim17
1 files changed, 0 insertions, 17 deletions
diff --git a/compiler/pathutils.nim b/compiler/pathutils.nim
index 4873f90d6..703467bc4 100644
--- a/compiler/pathutils.nim
+++ b/compiler/pathutils.nim
@@ -73,23 +73,6 @@ iterator dirs(x: string): (int, int) =
   var it: PathIter
   while hasNext(it, x): yield next(it, x)
 
-when false:
-  iterator dirs(x: string): (int, int) =
-    var i = 0
-    var first = true
-    while i < x.len:
-      let prev = i
-      if first and x[i] in {DirSep, AltSep}:
-        # absolute path:
-        inc i
-      else:
-        while i < x.len and x[i] notin {DirSep, AltSep}: inc i
-      if i > prev:
-        yield (prev, i-1)
-      first = false
-      # skip all separators:
-      while i < x.len and x[i] in {DirSep, AltSep}: inc i
-
 proc isDot(x: string; bounds: (int, int)): bool =
   bounds[1] == bounds[0] and x[bounds[0]] == '.'