Change NewRepl -> Repl
This commit is contained in:
parent
375db28ebb
commit
2929362046
@ -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, _..] => {
|
||||
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user