was ognna do homework but then osu happened
This commit is contained in:
parent
07624ca363
commit
efb6466919
1 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue