diff options
| author | Jonas Maier <> | 2026-03-05 08:45:45 +0100 |
|---|---|---|
| committer | Jonas Maier <> | 2026-03-05 08:45:45 +0100 |
| commit | 9e617dde12565ba4e0ec737893b204a5e5271689 (patch) | |
| tree | 69ed1d0fb097e5df0101871904f7fefc4519adf2 /src/main.rs | |
| parent | db1d0bb7c37e2c2943fe0fd8b6857110fdd00087 (diff) | |
| download | pish-9e617dde12565ba4e0ec737893b204a5e5271689.tar.gz | |
some parsing, also add panic that does not spill
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 7 |
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(); |
