harper_core/patterns/
inflection_of_be.rs1use super::Pattern;
2use crate::Token;
3use crate::patterns::WordSet;
4
5pub struct InflectionOfBe {
8 inner: WordSet,
10}
11
12impl Default for InflectionOfBe {
13 fn default() -> Self {
14 Self::new()
15 }
16}
17
18impl InflectionOfBe {
19 pub fn new() -> Self {
20 Self {
21 inner: WordSet::new(&["be", "am", "is", "are", "was", "were", "been", "being"]),
22 }
23 }
24}
25
26impl Pattern for InflectionOfBe {
27 fn matches(&self, tokens: &[Token], source: &[char]) -> Option<usize> {
28 self.inner.matches(tokens, source)
29 }
30}