summaryrefslogtreecommitdiff
path: root/src/main.rs
blob: 8976597fe32f40cf7982a646396873259ec88c5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
pub mod ast;
pub mod taiga;

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));
        }
        else {
            break;
        }
    }
}