From 012c50b7c3328065839e2ed0e1f5b9463369a947 Mon Sep 17 00:00:00 2001 From: greg Date: Sun, 6 May 2018 20:53:27 -0700 Subject: [PATCH] Kill commented lines --- schala-repl/src/lib.rs | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/schala-repl/src/lib.rs b/schala-repl/src/lib.rs index e33596e..1f58b7c 100644 --- a/schala-repl/src/lib.rs +++ b/schala-repl/src/lib.rs @@ -273,6 +273,8 @@ impl Repl { writeln!(buf, "MetaInterpreter options").unwrap(); writeln!(buf, "-----------------------").unwrap(); writeln!(buf, "exit | quit - exit the REPL").unwrap(); + writeln!(buf, "debug [show|hide] - show or hide debug info for a given pass").unwrap(); + writeln!(buf, "debug passes - display the names of all passes").unwrap(); writeln!(buf, "lang [prev|next|go |show] - toggle to previous or next language, go to a specific language by name, or show all languages").unwrap(); writeln!(buf, "Language-specific help for {}", lang.get_language_name()).unwrap(); writeln!(buf, "-----------------------").unwrap(); @@ -320,43 +322,6 @@ impl Repl { }, _ => Some(format!("Unknown debug command")) } - /* - * { - let show = match commands.get(1) { - Some(&"show") => true, - Some(&"hide") => false, - Some(e) => { - return Some(format!("Bad `set` argument: {}", e)); - } - None => { - return Some(format!("`set` - valid arguments `show {{option}}`, `hide {{option}}`")); - } - }; - match commands.get(2) { - Some(&"tokens") => self.options.debug.tokens = show, - Some(&"parse") => self.options.debug.parse_tree = show, - Some(&"ast") => self.options.debug.ast = show, - Some(&"symbols") => self.options.debug.symbol_table = show, - Some(&"llvm") => self.options.debug.llvm_ir = show, - Some(e) => return Some(format!("Bad `show`/`hide` argument: {}", e)), - None => return Some(format!("`show`/`hide` requires an argument")), - }; - None - }, - - AND DEBUG OPTIONS - - "options" => { - let ref d = self.options.debug; - let tokens = if d.tokens { "true".green() } else { "false".red() }; - let parse_tree = if d.parse_tree { "true".green() } else { "false".red() }; - let ast = if d.ast { "true".green() } else { "false".red() }; - let symbol_table = if d.symbol_table { "true".green() } else { "false".red() }; - Some(format!(r#"Debug: -tokens: {}, parse: {}, ast: {}, symbols: {}"#, tokens, parse_tree, ast, symbol_table)) - }, - - */ } }