aboutsummaryrefslogtreecommitdiffstats
path: root/src/parse.rs
diff options
context:
space:
mode:
authorJonas Maier <>2026-03-05 08:45:45 +0100
committerJonas Maier <>2026-03-05 08:45:45 +0100
commit9e617dde12565ba4e0ec737893b204a5e5271689 (patch)
tree69ed1d0fb097e5df0101871904f7fefc4519adf2 /src/parse.rs
parentdb1d0bb7c37e2c2943fe0fd8b6857110fdd00087 (diff)
downloadpish-9e617dde12565ba4e0ec737893b204a5e5271689.tar.gz
some parsing, also add panic that does not spill
Diffstat (limited to 'src/parse.rs')
-rw-r--r--src/parse.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/parse.rs b/src/parse.rs
index ec4be30..27b07de 100644
--- a/src/parse.rs
+++ b/src/parse.rs
@@ -1,23 +1,28 @@
+#[derive(Debug)]
pub enum Ast {
AssignVar(AssignVar),
Pipes(Pipes),
}
+#[derive(Debug)]
pub struct AssignVar {
pub to: String,
// TODO: body
}
+#[derive(Debug)]
pub struct Pipes {
pub cmds: Vec<Command>,
}
+#[derive(Debug)]
pub struct Command {
pub path: Vec<u8>,
pub args: Vec<Vec<u8>>,
}
-enum ParseError {
+#[derive(Debug)]
+pub enum ParseError {
/// "clean" EOF, i.e. not in the middle of something
Eof,