diff --git a/filter_parser/src/main.rs b/filter_parser/src/main.rs index 4158a2063..a3e4cab28 100644 --- a/filter_parser/src/main.rs +++ b/filter_parser/src/main.rs @@ -1,11 +1,16 @@ fn main() { let input = std::env::args().nth(1).expect("You must provide a filter to test"); - println!("Trying to execute the following filter:\n{}\n\n", input); + println!("Trying to execute the following filter:\n{}\n", input); - if let Err(e) = filter_parser::FilterCondition::parse(&input) { - println!("{}", e.to_string()); - } else { - println!("✅ Valid filter"); + match filter_parser::FilterCondition::parse(&input) { + Ok(filter) => { + println!("✅ Valid filter"); + println!("{:#?}", filter); + } + Err(e) => { + println!("❎ Invalid filter"); + println!("{}", e.to_string()); + } } }