spinoso_regexp/regexp/
oniguruma.rs

1use onig::RegexOptions;
2
3use crate::Options;
4
5impl From<Options> for RegexOptions {
6    fn from(opts: Options) -> Self {
7        let mut bits = RegexOptions::REGEX_OPTION_NONE;
8
9        bits.set(RegexOptions::REGEX_OPTION_MULTILINE, opts.multiline().is_enabled());
10        bits.set(RegexOptions::REGEX_OPTION_IGNORECASE, opts.ignore_case().is_enabled());
11        bits.set(RegexOptions::REGEX_OPTION_EXTEND, opts.extended().is_enabled());
12
13        bits
14    }
15}