rename schala_main -> repl_main

This commit is contained in:
greg 2018-03-23 19:04:32 -07:00
parent 1c7574150e
commit df51a1e04a
2 changed files with 3 additions and 4 deletions

View File

@ -38,7 +38,7 @@ include!(concat!(env!("OUT_DIR"), "/static.rs"));
pub use language::{LLVMCodeString, ProgrammingLanguageInterface, EvalOptions, ExecutionMethod, TraceArtifact, LanguageOutput, FinishedComputation, UnfinishedComputation};
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 option_matches = program_options().parse(std::env::args()).unwrap_or_else(|e| {
@ -190,7 +190,6 @@ impl Repl {
let output = self.input_handler(input);
println!("=> {}", output);
}
_ => (),
}
}
self.console.get_history().save(".schala_history").unwrap_or(());

View File

@ -4,7 +4,7 @@ extern crate maaru_lang;
extern crate rukka_lang;
extern crate robo_lang;
extern crate schala_lang;
use schala_repl::{PLIGenerator, schala_main};
use schala_repl::{PLIGenerator, repl_main};
extern { }
@ -15,6 +15,6 @@ fn main() {
Box::new(|| { Box::new(robo_lang::Robo::new())}),
Box::new(|| { Box::new(rukka_lang::Rukka::new())}),
];
schala_main(generators);
repl_main(generators);
}