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[..] {
|
match options.free[..] {
|
||||||
[] | [_] => {
|
[] | [_] => {
|
||||||
let mut repl = repl::NewRepl::new(langs);
|
let mut repl = repl::Repl::new(langs);
|
||||||
repl.run_repl();
|
repl.run_repl();
|
||||||
}
|
}
|
||||||
[_, ref filename, _..] => {
|
[_, ref filename, _..] => {
|
||||||
|
@ -12,19 +12,19 @@ use self::command_tree::CommandTree;
|
|||||||
const HISTORY_SAVE_FILE: &'static str = ".schala_history";
|
const HISTORY_SAVE_FILE: &'static str = ".schala_history";
|
||||||
const OPTIONS_SAVE_FILE: &'static str = ".schala_repl";
|
const OPTIONS_SAVE_FILE: &'static str = ".schala_repl";
|
||||||
|
|
||||||
pub struct NewRepl {
|
pub struct Repl {
|
||||||
interpreter_directive_sigil: char,
|
interpreter_directive_sigil: char,
|
||||||
line_reader: ::linefeed::interface::Interface<::linefeed::terminal::DefaultTerminal>,
|
line_reader: ::linefeed::interface::Interface<::linefeed::terminal::DefaultTerminal>,
|
||||||
language_states: Vec<Box<ProgrammingLanguageInterface>>,
|
language_states: Vec<Box<ProgrammingLanguageInterface>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl NewRepl {
|
impl Repl {
|
||||||
pub fn new(initial_states: Vec<Box<ProgrammingLanguageInterface>>) -> NewRepl {
|
pub fn new(initial_states: Vec<Box<ProgrammingLanguageInterface>>) -> Repl {
|
||||||
use linefeed::Interface;
|
use linefeed::Interface;
|
||||||
let line_reader = Interface::new("schala-repl").unwrap();
|
let line_reader = Interface::new("schala-repl").unwrap();
|
||||||
let interpreter_directive_sigil = ':';
|
let interpreter_directive_sigil = ':';
|
||||||
|
|
||||||
NewRepl {
|
Repl {
|
||||||
interpreter_directive_sigil, line_reader, language_states: initial_states,
|
interpreter_directive_sigil, line_reader, language_states: initial_states,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user