meilisearch/filter-parser/src/main.rs

17 lines
467 B
Rust
Raw Normal View History

fn main() {
let input = std::env::args().nth(1).expect("You must provide a filter to test");
2021-11-04 21:48:39 +08:00
println!("Trying to execute the following filter:\n{}\n", input);
2021-11-04 21:48:39 +08:00
match filter_parser::FilterCondition::parse(&input) {
Ok(filter) => {
println!("✅ Valid filter");
println!("{:#?}", filter);
}
Err(e) => {
println!("❎ Invalid filter");
println!("{}", e.to_string());
}
}
}