Add an interpret command to clif-util
This commit is contained in:
@@ -24,6 +24,7 @@ mod bugpoint;
|
||||
mod cat;
|
||||
mod compile;
|
||||
mod disasm;
|
||||
mod interpret;
|
||||
mod print_cfg;
|
||||
mod run;
|
||||
mod utils;
|
||||
@@ -179,6 +180,13 @@ fn main() {
|
||||
.arg(add_input_file_arg())
|
||||
.arg(add_debug_flag()),
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::with_name("interpret")
|
||||
.about("Interpret CLIF code")
|
||||
.arg(add_verbose_flag())
|
||||
.arg(add_input_file_arg())
|
||||
.arg(add_debug_flag()),
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::with_name("cat")
|
||||
.about("Outputs .clif file")
|
||||
@@ -239,6 +247,14 @@ fn main() {
|
||||
)
|
||||
.map(|_time| ())
|
||||
}
|
||||
("interpret", Some(rest_cmd)) => {
|
||||
handle_debug_flag(rest_cmd.is_present("debug"));
|
||||
interpret::run(
|
||||
get_vec(rest_cmd.values_of("file")),
|
||||
rest_cmd.is_present("verbose"),
|
||||
)
|
||||
.map(|_time| ())
|
||||
}
|
||||
("pass", Some(rest_cmd)) => {
|
||||
handle_debug_flag(rest_cmd.is_present("debug"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user