Fix : and = precedence in parseopt.
This commit is contained in:
parent
b4716e3b5b
commit
896766ae2c
2 changed files with 6 additions and 5 deletions
|
|
@ -71,7 +71,7 @@ when not defined(createNimRtl):
|
|||
proc next*(p: var TOptParser) {.rtl, extern: "npo$1".}
|
||||
|
||||
proc nextOption(p: var TOptParser, token: string, allowEmpty: bool) =
|
||||
for splitchar in ['=', ':']:
|
||||
for splitchar in [':', '=']:
|
||||
if splitchar in token:
|
||||
let pos = token.find(splitchar)
|
||||
p.key = token[0..pos-1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue