rename schala_main -> repl_main
This commit is contained in:
parent
898b185509
commit
e1398bd063
@ -38,7 +38,7 @@ include!(concat!(env!("OUT_DIR"), "/static.rs"));
|
|||||||
pub use language::{LLVMCodeString, ProgrammingLanguageInterface, EvalOptions, ExecutionMethod, TraceArtifact, LanguageOutput, FinishedComputation, UnfinishedComputation};
|
pub use language::{LLVMCodeString, ProgrammingLanguageInterface, EvalOptions, ExecutionMethod, TraceArtifact, LanguageOutput, FinishedComputation, UnfinishedComputation};
|
||||||
pub type PLIGenerator = Box<Fn() -> Box<ProgrammingLanguageInterface> + Send + Sync>;
|
pub type PLIGenerator = Box<Fn() -> Box<ProgrammingLanguageInterface> + Send + Sync>;
|
||||||
|
|
||||||
pub fn schala_main(generators: Vec<PLIGenerator>) {
|
pub fn repl_main(generators: Vec<PLIGenerator>) {
|
||||||
let languages: Vec<Box<ProgrammingLanguageInterface>> = generators.iter().map(|x| x()).collect();
|
let languages: Vec<Box<ProgrammingLanguageInterface>> = generators.iter().map(|x| x()).collect();
|
||||||
|
|
||||||
let option_matches = program_options().parse(std::env::args()).unwrap_or_else(|e| {
|
let option_matches = program_options().parse(std::env::args()).unwrap_or_else(|e| {
|
||||||
@ -190,7 +190,6 @@ impl Repl {
|
|||||||
let output = self.input_handler(input);
|
let output = self.input_handler(input);
|
||||||
println!("=> {}", output);
|
println!("=> {}", output);
|
||||||
}
|
}
|
||||||
_ => (),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.console.get_history().save(".schala_history").unwrap_or(());
|
self.console.get_history().save(".schala_history").unwrap_or(());
|
||||||
|
@ -4,7 +4,7 @@ extern crate maaru_lang;
|
|||||||
extern crate rukka_lang;
|
extern crate rukka_lang;
|
||||||
extern crate robo_lang;
|
extern crate robo_lang;
|
||||||
extern crate schala_lang;
|
extern crate schala_lang;
|
||||||
use schala_repl::{PLIGenerator, schala_main};
|
use schala_repl::{PLIGenerator, repl_main};
|
||||||
|
|
||||||
extern { }
|
extern { }
|
||||||
|
|
||||||
@ -15,6 +15,6 @@ fn main() {
|
|||||||
Box::new(|| { Box::new(robo_lang::Robo::new())}),
|
Box::new(|| { Box::new(robo_lang::Robo::new())}),
|
||||||
Box::new(|| { Box::new(rukka_lang::Rukka::new())}),
|
Box::new(|| { Box::new(rukka_lang::Rukka::new())}),
|
||||||
];
|
];
|
||||||
schala_main(generators);
|
repl_main(generators);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user