redpatterns 0.2.0

a list of patterns for scanners 📟
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Provides many pre-compiled pomsky expressions for use in scanners.

#![no_std]

include!(concat!(env!("OUT_DIR"), "/patterns.rs"));

/// Retrieve the compiled patterns for use with `regex` crate
pub fn patterns() -> &'static [(&'static str, &'static str)] {
    PATTERNS
}

#[cfg(test)]
mod tests {
    #[test]
    fn non_empty() {
        assert_ne!(0, crate::patterns().len());
    }
}