mirror of
https://github.com/azur1s/bobbylisp.git
synced 2024-10-16 02:37:40 -05:00
feat: unoptionize command
This commit is contained in:
parent
dc3d400d50
commit
8230151489
|
@ -6,7 +6,7 @@ use structopt::StructOpt;
|
|||
#[structopt(name = "blspc")]
|
||||
pub struct Opts {
|
||||
#[structopt(subcommand)]
|
||||
pub commands: Option<Args>,
|
||||
pub commands: Args,
|
||||
}
|
||||
|
||||
#[derive(StructOpt, Debug)]
|
||||
|
|
|
@ -17,9 +17,7 @@ use vm::{vm::VM, parser::parse_instr};
|
|||
fn main() {
|
||||
let start = Instant::now();
|
||||
let args = Opts::from_args();
|
||||
|
||||
if let Some(commands) = args.commands {
|
||||
match commands {
|
||||
match args.commands {
|
||||
args::Args::Compile(args) => {
|
||||
let src = read_to_string(&args.file).unwrap();
|
||||
let debug = args.debug;
|
||||
|
@ -32,7 +30,6 @@ fn main() {
|
|||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn compile_src(src: String, path: Option<PathBuf>, file: PathBuf, debug: bool, start: Instant) {
|
||||
let file_name = match path {
|
||||
|
|
Loading…
Reference in a new issue