summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorFlaviu Tamas <tamasflaviu@gmail.com>2015-01-15 17:07:07 -0500
committerFlaviu Tamas <tamasflaviu@gmail.com>2015-01-15 17:39:14 -0500
commitd649cec033e961e7d6e16a24e1551083e1ec187a (patch)
treeaa0fbc3f39cc1845ccf26ce450956abcf2bd0e2b /src
parenta198c10d6c4f2c2c5434c0edb0fb4f519906433c (diff)
downloadNim-d649cec033e961e7d6e16a24e1551083e1ec187a.tar.gz
s/asSeq/toSeq
`toSeq` is a better name for it
Diffstat (limited to 'src')
-rw-r--r--src/nre.nim10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nre.nim b/src/nre.nim
index ce51b6cd5..f5eaaf418 100644
--- a/src/nre.nim
+++ b/src/nre.nim
@@ -156,7 +156,7 @@ proc asTable*(pattern: CaptureBounds, default = None[Slice[int]]()):
   result = initTable[string, Option[Slice[int]]]()
   asTableImpl(nextVal.isNone)
 
-template asSeqImpl(cond: bool): stmt {.immediate, dirty.} =
+template toSeqImpl(cond: bool): stmt {.immediate, dirty.} =
   result = @[]
   for i in 0 .. <RegexMatch(pattern).pattern.captureCount:
     let nextVal = pattern[i]
@@ -165,11 +165,11 @@ template asSeqImpl(cond: bool): stmt {.immediate, dirty.} =
     else:
       result.add(nextVal)
 
-proc asSeq*(pattern: CaptureBounds, default = None[Slice[int]]()): seq[Option[Slice[int]]] =
-  asSeqImpl(nextVal.isNone)
+proc toSeq*(pattern: CaptureBounds, default = None[Slice[int]]()): seq[Option[Slice[int]]] =
+  toSeqImpl(nextVal.isNone)
 
-proc asSeq*(pattern: Captures, default: string = nil): seq[string] =
-  asSeqImpl(nextVal == nil)
+proc toSeq*(pattern: Captures, default: string = nil): seq[string] =
+  toSeqImpl(nextVal == nil)
 # }}}
 
 # Creation & Destruction {{{