harper_core/patterns/relative_pronoun.rs
1use crate::Token;
2
3use super::{SingleTokenPattern, WordSet};
4
5pub struct RelativePronoun {
6 inner: WordSet,
7}
8
9impl Default for RelativePronoun {
10 fn default() -> Self {
11 Self {
12 inner: WordSet::new(&["that", "which", "who", "whom", "whose"]),
13 }
14 }
15}
16
17impl SingleTokenPattern for RelativePronoun {
18 fn matches_token(&self, token: &Token, source: &[char]) -> bool {
19 self.inner.matches_token(token, source)
20 }
21}