summary refs log tree commit diff stats
path: root/tests/run
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-08-16 08:34:33 +0200
committerAraq <rumpf_a@web.de>2012-08-16 08:34:33 +0200
commit0171566c98d7341ef6c4c36a1d056b19e24f681e (patch)
treedd211866c615402ae1f380d1ed79eb1cef27eb1b /tests/run
parent12151930101f6eacb834c2102cfdaccc637ce72a (diff)
downloadNim-0171566c98d7341ef6c4c36a1d056b19e24f681e.tar.gz
openarray/varargs split; breaks bootstrapping
Diffstat (limited to 'tests/run')
-rwxr-xr-xtests/run/tpegs.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/run/tpegs.nim b/tests/run/tpegs.nim
index 595bdfaea..a073f8856 100755
--- a/tests/run/tpegs.nim
+++ b/tests/run/tpegs.nim
@@ -161,7 +161,7 @@ template multipleOp(k: TPegKind, localOpt: expr) =
   if result.len == 1:
     result = result.sons[0]
 
-proc `/`*(a: openArray[TPeg]): TPeg {.
+proc `/`*(a: varargs[TPeg]): TPeg {.
   rtl, extern: "npegsOrderedChoice".} =
   ## constructs an ordered choice with the PEGs in `a`
   multipleOp(pkOrderedChoice, addChoice)
@@ -178,7 +178,7 @@ proc addSequence(dest: var TPeg, elem: TPeg) =
     else: add(dest, elem)
   else: add(dest, elem)
 
-proc sequence*(a: openArray[TPeg]): TPeg {.
+proc sequence*(a: varargs[TPeg]): TPeg {.
   rtl, extern: "npegs$1".} =
   ## constructs a sequence with all the PEGs from `a`
   multipleOp(pkSequence, addSequence)
@@ -935,7 +935,7 @@ proc replace*(s: string, sub: TPeg, by = ""): string {.
       inc(i, x)
   add(result, substr(s, i))
   
-proc parallelReplace*(s: string, subs: openArray[
+proc parallelReplace*(s: string, subs: varargs[
                       tuple[pattern: TPeg, repl: string]]): string {.
                       rtl, extern: "npegs$1".} = 
   ## Returns a modified copy of `s` with the substitutions in `subs`
@@ -957,7 +957,7 @@ proc parallelReplace*(s: string, subs: openArray[
   add(result, substr(s, i))  
   
 proc transformFile*(infile, outfile: string,
-                    subs: openArray[tuple[pattern: TPeg, repl: string]]) {.
+                    subs: varargs[tuple[pattern: TPeg, repl: string]]) {.
                     rtl, extern: "npegs$1".} =
   ## reads in the file `infile`, performs a parallel replacement (calls
   ## `parallelReplace`) and writes back to `outfile`. Calls ``quit`` if an
id='n188' href='#n188'>188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226