Implement help for vstc assemble

This commit is contained in:
Andrew Morris
2022-04-26 11:11:53 +10:00
parent c9655617fc
commit e47690b83f

View File

@@ -1,3 +1,24 @@
use std::process::exit;
pub fn command(args: &Vec<String>) {
println!("assemble command test {}", args.len())
if args.len() != 3 {
println!("ERROR: Unrecognized command\n");
show_help();
exit(1);
}
if args[2] == "-h" || args[2] == "--help" {
show_help();
return;
}
println!("TODO: assemble file {}", args[2]);
}
fn show_help() {
println!("vstc assemble");
println!("Convert ValueScript assembly to bytecode");
println!("");
println!("USAGE:");
println!(" vstc assemble <file>");
}