diff options
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 |