was ognna do homework but then osu happened

This commit is contained in:
Michael Zhang 2023-11-04 14:40:16 -05:00
parent 07624ca363
commit efb6466919

View file

@ -1,11 +1,12 @@
use anyhow::Result;
use bidir::{bidir::synthesize, data::Context, parser::TermParser};
use rustyline::DefaultEditor;
use rustyline::{Config, DefaultEditor};
fn main() -> Result<()> {
let term_parser = TermParser::new();
let mut rl = DefaultEditor::new()?;
let rl_config = Config::builder().auto_add_history(true).build();
let mut rl = DefaultEditor::with_config(rl_config)?;
loop {
let line = match rl.readline(">> ") {
@ -17,7 +18,7 @@ fn main() -> Result<()> {
let parsed_term = match term_parser.parse(&line) {
Ok(term) => term,
Err(err) => {
eprintln!("SHIET sucks bro: {err}");
eprintln!("parser error: {err}");
continue;
}
};