1 #![cfg_attr(feature = "pattern", feature(pattern))] 2 3 macro_rules! regex_new { 4 ($re:expr) => {{ 5 use regex::internal::ExecBuilder; 6 ExecBuilder::new($re).nfa().build().map(|e| e.into_regex()) 7 }}; 8 } 9 10 macro_rules! regex { 11 ($re:expr) => { 12 regex_new!($re).unwrap() 13 }; 14 } 15 16 macro_rules! regex_set_new { 17 ($re:expr) => {{ 18 use regex::internal::ExecBuilder; 19 ExecBuilder::new_many($re).nfa().build().map(|e| e.into_regex_set()) 20 }}; 21 } 22 23 macro_rules! regex_set { 24 ($res:expr) => { 25 regex_set_new!($res).unwrap() 26 }; 27 } 28 29 // Must come before other module definitions. 30 include!("macros_str.rs"); 31 include!("macros.rs"); 32 33 mod api; 34 mod api_str; 35 mod crazy; 36 mod flags; 37 mod fowler; 38 mod multiline; 39 mod noparse; 40 mod regression; 41 mod replace; 42 mod searcher; 43 mod set; 44 mod suffix_reverse; 45 #[cfg(feature = "unicode")] 46 mod unicode; 47 #[cfg(feature = "unicode-perl")] 48 mod word_boundary; 49 #[cfg(feature = "unicode-perl")] 50 mod word_boundary_unicode; 51