Get rid of virtual machine code
Gonna implement this differently
This commit is contained in:
parent
abbbb34901
commit
1aa4e3b942
22
src/main.rs
22
src/main.rs
@ -29,12 +29,8 @@ mod language;
|
|||||||
use language::{ProgrammingLanguageInterface, EvalOptions, LLVMCodeString};
|
use language::{ProgrammingLanguageInterface, EvalOptions, LLVMCodeString};
|
||||||
|
|
||||||
mod webapp;
|
mod webapp;
|
||||||
|
|
||||||
mod llvm_wrap;
|
mod llvm_wrap;
|
||||||
|
|
||||||
mod virtual_machine;
|
|
||||||
use virtual_machine::{run_vm, run_assembler};
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let languages: Vec<Box<ProgrammingLanguageInterface>> =
|
let languages: Vec<Box<ProgrammingLanguageInterface>> =
|
||||||
vec![
|
vec![
|
||||||
@ -63,18 +59,6 @@ fn main() {
|
|||||||
std::process::exit(0);
|
std::process::exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if option_matches.opt_present("m") {
|
|
||||||
let file_name = option_matches.free.get(1);
|
|
||||||
run_vm(file_name);
|
|
||||||
std::process::exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if option_matches.opt_present("a") {
|
|
||||||
let file_name = option_matches.free.get(1);
|
|
||||||
run_assembler(file_name);
|
|
||||||
std::process::exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if option_matches.opt_present("w") {
|
if option_matches.opt_present("w") {
|
||||||
webapp::web_main();
|
webapp::web_main();
|
||||||
std::process::exit(0);
|
std::process::exit(0);
|
||||||
@ -366,12 +350,6 @@ fn program_options() -> getopts::Options {
|
|||||||
options.optflag("h",
|
options.optflag("h",
|
||||||
"help",
|
"help",
|
||||||
"Show help text");
|
"Show help text");
|
||||||
options.optflag("m",
|
|
||||||
"virtual-machine",
|
|
||||||
"Start up a virtual machine instead of an interpreter");
|
|
||||||
options.optflag("a",
|
|
||||||
"assembler",
|
|
||||||
"Assemble file into bytecode");
|
|
||||||
options.optflag("w",
|
options.optflag("w",
|
||||||
"webapp",
|
"webapp",
|
||||||
"Start up web interpreter");
|
"Start up web interpreter");
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
pub fn run_vm(file_name: Option<&String>) {
|
|
||||||
println!("Running in VM mode");
|
|
||||||
println!("yy: {:?}", file_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn run_assembler(file_name: Option<&String>) {
|
|
||||||
println!("Assembling file");
|
|
||||||
println!("yy: {:?}", file_name);
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user