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/parse.rs | |
| parent | db1d0bb7c37e2c2943fe0fd8b6857110fdd00087 (diff) | |
| download | pish-9e617dde12565ba4e0ec737893b204a5e5271689.tar.gz | |
some parsing, also add panic that does not spill
Diffstat (limited to 'src/parse.rs')
| -rw-r--r-- | src/parse.rs | 7 |
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, |
