rcalc 0.1.2

Glorified calculator with a lexer, parser, and interpreter written in Rust.
Documentation
extern crate rcalc;
extern crate rustyline;

use rcalc::Interpreter;
use rustyline::error::ReadlineError;
use rustyline::Editor;

fn main() {
    let mut console = Editor::<()>::new();
    loop {
        let input = console.readline("rcalc> ");
        match input {
            Ok(line) => {
                console.add_history_entry(&line);
                if line.trim().len() > 0 {
                    match Interpreter::process(&line) {
                        Ok(ans) => println!("{}", ans),
                        Err(e) => println!("{}", e),
                    };
                } else {
                    continue;
                }
            }
            Err(ReadlineError::Interrupted) |
            Err(ReadlineError::Eof) => break,
            Err(err) => {
                println!("ReadlineError: {:?}", err);
                break;
            }
        }
    }
}