Fix : and = precedence in parseopt.

This commit is contained in:
Michał Zieliński 2013-12-10 19:10:06 +01:00
commit 896766ae2c
2 changed files with 6 additions and 5 deletions

View file

@ -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]