Flatten conditionals in rustc.rs. Remove FIXME

This commit is contained in:
Brian Anderson
2011-03-06 13:00:52 -05:00
committed by Graydon Hoare
parent bed457d3a7
commit b893bec4bb

View File

@@ -113,24 +113,19 @@ impure fn main(vec[str] args) {
do_warn = false; do_warn = false;
} else if (_str.eq(arg, "-shared")) { } else if (_str.eq(arg, "-shared")) {
shared = true; shared = true;
} else { } else if (_str.eq(arg, "-o")) {
// FIXME: rust could use an elif construct. if (i+1u < len) {
if (_str.eq(arg, "-o")) { output_file = some(args.(i+1u));
if (i+1u < len) { i += 1u;
output_file = some(args.(i+1u));
i += 1u;
} else {
usage(sess, args.(0));
sess.err("-o requires an argument");
}
} else { } else {
if (_str.eq(arg, "-h")) { usage(sess, args.(0));
usage(sess, args.(0)); sess.err("-o requires an argument");
} else {
usage(sess, args.(0));
sess.err("unrecognized option: " + arg);
}
} }
} else if (_str.eq(arg, "-h")) {
usage(sess, args.(0));
} else {
usage(sess, args.(0));
sess.err("unrecognized option: " + arg);
} }
} else { } else {
alt (input_file) { alt (input_file) {