aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 9b10890..edf5cb0 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -9,6 +9,7 @@ mod cursor;
mod linebuf;
mod parse;
mod raw;
+mod panic;
use linebuf::LineBuf;
use raw::*;
@@ -36,6 +37,10 @@ macro_rules! println {
const PROMPT: &str = "> ";
fn run_command(raw: &ScopedRawMode, line: Vec<u8>) {
+
+ let parsed = parse::do_parse(&line);
+ println!("{parsed:?}");
+
let mut words: Vec<&[u8]> = line.split(|x| *x == b' ').collect();
words.retain(|w| !w.is_empty());
@@ -84,6 +89,8 @@ fn run_command(raw: &ScopedRawMode, line: Vec<u8>) {
}
fn main() {
+ crate::panic::hook();
+
let stdin = io::stdin();
let stdout = io::stdout();