1 // Licensed under the Apache License, Version 2.0 2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT 3 // license <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your 4 // option. All files in the project carrying such notice may not be copied, 5 // modified, or distributed except according to those terms. 6 7 #![cfg_attr(not(feature = "std"), no_std)] 8 extern crate alloc; 9 extern crate pest; 10 extern crate pest_derive; 11 12 use pest::Parser; 13 use pest_derive::Parser; 14 15 #[derive(Parser)] 16 #[grammar = "../tests/implicit.pest"] 17 struct TestImplicitParser; 18 19 #[test] test_implicit_whitespace()20fn test_implicit_whitespace() { 21 // this failed to parse due to a bug in the optimizer 22 // see: https://github.com/pest-parser/pest/issues/762#issuecomment-1375374868 23 let successful_parse = TestImplicitParser::parse(Rule::program, "a a"); 24 assert!(successful_parse.is_ok()); 25 } 26