From 93e96acc668c990263285f5cfc395fde9f805b84 Mon Sep 17 00:00:00 2001 From: greg Date: Sun, 10 Feb 2019 01:00:40 -0800 Subject: [PATCH] Some initial work on a better repl --- schala-repl/src/lib.rs | 4 ++++ schala-repl/src/new_repl.rs | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100644 schala-repl/src/new_repl.rs diff --git a/schala-repl/src/lib.rs b/schala-repl/src/lib.rs index 508d848..6a9db41 100644 --- a/schala-repl/src/lib.rs +++ b/schala-repl/src/lib.rs @@ -23,6 +23,7 @@ use std::io::Read; use std::process::exit; use std::default::Default; +mod new_repl; mod repl; mod language; mod webapp; @@ -82,8 +83,11 @@ pub fn repl_main(generators: Vec) { match option_matches.free[..] { [] | [_] => { + /* let mut repl = repl::Repl::new(languages, initial_index); repl.run(); + */ + new_repl::run(); } [_, ref filename, _..] => { diff --git a/schala-repl/src/new_repl.rs b/schala-repl/src/new_repl.rs new file mode 100644 index 0000000..78eef1e --- /dev/null +++ b/schala-repl/src/new_repl.rs @@ -0,0 +1,11 @@ +use cursive::Cursive; +use cursive::views::{Dialog, TextView}; + +pub fn run() { + println!("YOLO"); + let mut siv = Cursive::default(); + siv.add_layer(Dialog::around(TextView::new("FUCKO")) + .title("YOLO SWAGGGGG") + .button("exit", |s| { s.quit() })); + siv.run(); +}