forked from mirrors/gecko-dev
		
	Differential Revision: https://phabricator.services.mozilla.com/D54616 --HG-- rename : third_party/rust/itoa/LICENSE-MIT => third_party/rust/ffi-support/LICENSE-MIT rename : third_party/rust/regex/src/literal/mod.rs => third_party/rust/regex/src/literal/imp.rs rename : third_party/rust/ryu/benchmark/benchmark.rs => third_party/rust/ryu/examples/upstream_benchmark.rs rename : third_party/rust/ryu/src/mulshift128.rs => third_party/rust/ryu/src/d2s_intrinsics.rs extra : moz-landing-system : lando
		
			
				
	
	
		
			59 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			59 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			Rust
		
	
	
	
	
	
#![cfg_attr(feature = "pattern", feature(pattern))]
 | 
						|
 | 
						|
extern crate rand;
 | 
						|
extern crate regex;
 | 
						|
 | 
						|
macro_rules! regex_new {
 | 
						|
    ($re:expr) => {{
 | 
						|
        use regex::internal::ExecBuilder;
 | 
						|
        ExecBuilder::new($re)
 | 
						|
            .bounded_backtracking()
 | 
						|
            .build()
 | 
						|
            .map(|e| e.into_regex())
 | 
						|
    }};
 | 
						|
}
 | 
						|
 | 
						|
macro_rules! regex {
 | 
						|
    ($re:expr) => {
 | 
						|
        regex_new!($re).unwrap()
 | 
						|
    };
 | 
						|
}
 | 
						|
 | 
						|
macro_rules! regex_set_new {
 | 
						|
    ($re:expr) => {{
 | 
						|
        use regex::internal::ExecBuilder;
 | 
						|
        ExecBuilder::new_many($re)
 | 
						|
            .bounded_backtracking()
 | 
						|
            .build()
 | 
						|
            .map(|e| e.into_regex_set())
 | 
						|
    }};
 | 
						|
}
 | 
						|
 | 
						|
macro_rules! regex_set {
 | 
						|
    ($res:expr) => {
 | 
						|
        regex_set_new!($res).unwrap()
 | 
						|
    };
 | 
						|
}
 | 
						|
 | 
						|
// Must come before other module definitions.
 | 
						|
include!("macros_str.rs");
 | 
						|
include!("macros.rs");
 | 
						|
 | 
						|
mod api;
 | 
						|
mod api_str;
 | 
						|
mod crazy;
 | 
						|
mod flags;
 | 
						|
mod fowler;
 | 
						|
mod multiline;
 | 
						|
mod noparse;
 | 
						|
mod regression;
 | 
						|
mod replace;
 | 
						|
mod searcher;
 | 
						|
mod set;
 | 
						|
mod suffix_reverse;
 | 
						|
#[cfg(feature = "unicode")]
 | 
						|
mod unicode;
 | 
						|
#[cfg(feature = "unicode-perl")]
 | 
						|
mod word_boundary;
 | 
						|
#[cfg(feature = "unicode-perl")]
 | 
						|
mod word_boundary_unicode;
 |