diff options
author | Benjamin Shirley-Quirk | 2020-08-05 00:44:55 +0000 |
---|---|---|
committer | Benjamin Shirley-Quirk | 2020-08-05 00:44:55 +0000 |
commit | cb63408d7d9de91020a7a815216b531fdf944b47 (patch) | |
tree | b983f9179a37f3f088f7b1e9230c9d705f55a947 /src/args.nim | |
parent | 22799b2e439d6b74ca648060faa1e3f1ee13f946 (diff) |
removed listcomp.nim
Diffstat (limited to 'src/args.nim')
-rw-r--r-- | src/args.nim | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/args.nim b/src/args.nim index acf9604..b93d5fb 100644 --- a/src/args.nim +++ b/src/args.nim @@ -1,6 +1,6 @@ import options, os, posix, sequtils, sets, strutils, sugar, - utils, "listcomp" + utils type ArgumentType* {.pure.} = enum @@ -105,13 +105,12 @@ proc splitArgs*(params: seq[string], let consumedNext = argsResult.map(a => a.consumedNext).foldl(a or b) let newNext = next.filter(n => not consumedNext) when NimVersion >= "1.2": - let lc = collect(newSeq): + return((block:collect(newSeq): for x in argsResult: (x.key,x.value,ArgumentType.short) - return (lc, newNext, stdinConsumed, false) + ), newNext, stdinConsumed, false) else: - return (lc[(x.key, x.value, ArgumentType.short) | (x <- argsResult), Argument], - newNext, stdinConsumed, false) + return (lc[(x.key, x.value, ArgumentType.short) | (x <- argsResult), Argument], newNext, stdinConsumed, false) else: return (@[(current, none(string), ArgumentType.target)], next, stdinConsumed, false) |