Add assembler stub

This commit is contained in:
Andrew Morris
2022-04-26 10:58:38 +10:00
parent ffc5f4709d
commit dd62bba31a
3 changed files with 16 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ edition = "2021"
[[bin]]
name = "vstc"
path = "src/vstc/main.rs"
test = false
bench = false

3
src/vstc/assemble.rs Normal file
View File

@@ -0,0 +1,3 @@
pub fn command(args: &Vec<String>) {
println!("assemble command test {}", args.len())
}

View File

@@ -1,4 +1,7 @@
mod assemble;
use std::env;
use std::process::exit;
fn main() {
let args: Vec<String> = env::args().collect();
@@ -11,6 +14,15 @@ fn main() {
show_help();
return;
}
if args.len() >= 2 && args[1] == "assemble" {
assemble::command(&args);
return;
}
println!("ERROR: Unrecognized command\n");
show_help();
exit(1);
}
fn show_help() {