diff options
author | Araq <rumpf_a@web.de> | 2012-08-16 08:34:33 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-08-16 08:34:33 +0200 |
commit | 0171566c98d7341ef6c4c36a1d056b19e24f681e (patch) | |
tree | dd211866c615402ae1f380d1ed79eb1cef27eb1b /tests/run | |
parent | 12151930101f6eacb834c2102cfdaccc637ce72a (diff) | |
download | Nim-0171566c98d7341ef6c4c36a1d056b19e24f681e.tar.gz |
openarray/varargs split; breaks bootstrapping
Diffstat (limited to 'tests/run')
-rwxr-xr-x | tests/run/tpegs.nim | 8 |
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 |