Skip to main content

exec_dbg/
exec_dbg.rs

1fn main() {
2    use mii_http::parse::exec::parse_exec;
3    let cases = ["echo Hello, [%name] [%guest]", "$ | xargs echo", "echo title=[$.title] count=[$.count]", "echo user [:user_id]"];
4    for c in &cases {
5        println!("--- {}", c);
6        match parse_exec(c, 0) {
7            Ok(stages) => for s in &stages { println!("  {:#?}", s); },
8            Err(e) => println!("  ERR: {} @ {:?}", e.message, e.span),
9        }
10    }
11}