cmd/v: fix argument parsing
parent
c6fabea49d
commit
4bade9bcea
14
cmd/v/v.v
14
cmd/v/v.v
|
@ -121,10 +121,18 @@ fn parse_args(args []string) (&pref.Preferences, string) {
|
||||||
res.out_name = cmdline.option(args, '-o', '')
|
res.out_name = cmdline.option(args, '-o', '')
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
'-csource', '-backend' {
|
|
||||||
i++ // TODO
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
|
mut should_continue := false
|
||||||
|
for flag_with_param in list_of_flags_with_param {
|
||||||
|
if '-$flag_with_param' == arg {
|
||||||
|
should_continue = true
|
||||||
|
i++
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if should_continue {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if !arg.starts_with('-') && command == '' {
|
if !arg.starts_with('-') && command == '' {
|
||||||
command = arg
|
command = arg
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue