diff options
Diffstat (limited to 'src/parse/regex/mod.rs')
| -rw-r--r-- | src/parse/regex/mod.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/parse/regex/mod.rs b/src/parse/regex/mod.rs index 1c761a1..d5e4cdf 100644 --- a/src/parse/regex/mod.rs +++ b/src/parse/regex/mod.rs @@ -89,7 +89,7 @@ fn parse_rep(s: &mut super::Cursor<'_>) -> Result<Pattern> { // TODO: non-greedy } -const SYMBOLS: &[u8] = b"{}[]()*+-?| "; +const SYMBOLS: &[u8] = b"{}[]()*+-?|. "; fn is_symbol(x: u8) -> bool { SYMBOLS.contains(&x) } @@ -150,6 +150,10 @@ fn parse_atom(s: &mut super::Cursor<'_>) -> Result<Pattern> { } Ok(inner) } + b'.' => { + s.adv(); + Ok(Pattern::Range(0, 127)) + } x if is_symbol(x) => Ok(Pattern::Nothing), ch => { s.adv(); |
