Change NewRepl -> Repl

This commit is contained in:
greg 2019-03-14 03:42:39 -07:00
parent 375db28ebb
commit 2929362046
2 changed files with 5 additions and 5 deletions

View File

@ -44,7 +44,7 @@ pub fn start_repl(langs: Vec<Box<dyn ProgrammingLanguageInterface>>) {
match options.free[..] {
[] | [_] => {
let mut repl = repl::NewRepl::new(langs);
let mut repl = repl::Repl::new(langs);
repl.run_repl();
}
[_, ref filename, _..] => {

View File

@ -12,19 +12,19 @@ use self::command_tree::CommandTree;
const HISTORY_SAVE_FILE: &'static str = ".schala_history";
const OPTIONS_SAVE_FILE: &'static str = ".schala_repl";
pub struct NewRepl {
pub struct Repl {
interpreter_directive_sigil: char,
line_reader: ::linefeed::interface::Interface<::linefeed::terminal::DefaultTerminal>,
language_states: Vec<Box<ProgrammingLanguageInterface>>,
}
impl NewRepl {
pub fn new(initial_states: Vec<Box<ProgrammingLanguageInterface>>) -> NewRepl {
impl Repl {
pub fn new(initial_states: Vec<Box<ProgrammingLanguageInterface>>) -> Repl {
use linefeed::Interface;
let line_reader = Interface::new("schala-repl").unwrap();
let interpreter_directive_sigil = ':';
NewRepl {
Repl {
interpreter_directive_sigil, line_reader, language_states: initial_states,
}
}