mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-04-18 03:00:27 -04:00
Add assembler stub
This commit is contained in:
@@ -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
3
src/vstc/assemble.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
pub fn command(args: &Vec<String>) {
|
||||
println!("assemble command test {}", args.len())
|
||||
}
|
||||
@@ -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() {
|
||||
Reference in New Issue
Block a user