Skip to content

Commit ea72de9

Browse files
committed
Adding unit structs for Perl character classes.
1 parent d81432f commit ea72de9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/lib.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,19 @@
99
1010
use regex::Regex;
1111

12+
/// A unit struct for the digit character class (i.e., the digits 0 through 9)
13+
struct Digit;
14+
/// A unit struct for the non-digit character class (i.e., everything BUT the digits 0-9)
15+
struct NonDigit;
16+
/// A unit struct for the word character class (i.e., all alphanumeric characters plus underscore)
17+
struct Word;
18+
/// A unit struct for the non-word character class (i.e., everything BUT the alphanumeric characters plus underscore)
19+
struct NonWord;
20+
/// A unit structure for the whitespace character class (i.e., space and tab)
21+
struct Whitespace;
22+
/// A unit structure for the whitespace character class (i.e., everything BUT space and tab)
23+
struct NonWhitespace;
24+
1225
/// The HumanRegex struct which maintains and updates the regex string
1326
#[derive(Default)]
1427
pub struct HumanRegex {

0 commit comments

Comments
 (0)