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