summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Li <li.davidm96@gmail.com>2017-11-04 19:20:25 -0400
committerDavid Li <li.davidm96@gmail.com>2017-11-04 19:20:25 -0400
commit6cbe4d98095020451f5b427fecbc3f374812dec8 (patch)
tree644a616c934ddaabd006abeb8fcdd84175aa29ef /src
parentc9d3f7629cfdacededf2a92252e6c9de8a8b75ae (diff)
Display a prompt in the REPL
Diffstat (limited to 'src')
-rw-r--r--src/main.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 2564011..8976597 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,13 +1,15 @@
pub mod ast;
pub mod taiga;
-use std::io::{self, BufRead};
+use std::io::{self, BufRead, Write};
fn main() {
let stdin = io::stdin();
let mut handle = stdin.lock();
loop {
let mut input = String::new();
+ print!("taiga> ");
+ io::stdout().flush().unwrap();
if let Ok(n) = handle.read_line(&mut input) {
if n == 0 { break; }
println!("{:?}", taiga::parse_Program(&input));