pub struct SequencePattern { /* private fields */ }
Expand description
A pattern that checks that a sequence of other patterns match.
Implementations§
Source§impl SequencePattern
impl SequencePattern
pub fn then_noun(self) -> Self
pub fn then_one_or_more_nouns(self) -> Self
pub fn then_anything_but_noun(self) -> Self
pub fn then_plural_noun(self) -> Self
pub fn then_one_or_more_plural_nouns(self) -> Self
pub fn then_anything_but_plural_noun(self) -> Self
pub fn then_verb(self) -> Self
pub fn then_one_or_more_verbs(self) -> Self
pub fn then_anything_but_verb(self) -> Self
pub fn then_linking_verb(self) -> Self
pub fn then_one_or_more_linking_verbs(self) -> Self
pub fn then_anything_but_linking_verb(self) -> Self
pub fn then_pronoun(self) -> Self
pub fn then_one_or_more_pronouns(self) -> Self
pub fn then_anything_but_pronoun(self) -> Self
pub fn then_punctuation(self) -> Self
pub fn then_one_or_more_punctuations(self) -> Self
pub fn then_anything_but_punctuation(self) -> Self
pub fn then_conjunction(self) -> Self
pub fn then_one_or_more_conjunctions(self) -> Self
pub fn then_anything_but_conjunction(self) -> Self
pub fn then_comma(self) -> Self
pub fn then_one_or_more_commas(self) -> Self
pub fn then_anything_but_comma(self) -> Self
pub fn then_period(self) -> Self
pub fn then_one_or_more_periods(self) -> Self
pub fn then_anything_but_period(self) -> Self
pub fn then_number(self) -> Self
pub fn then_one_or_more_numbers(self) -> Self
pub fn then_anything_but_number(self) -> Self
pub fn then_case_separator(self) -> Self
pub fn then_one_or_more_case_separators(self) -> Self
pub fn then_anything_but_case_separator(self) -> Self
pub fn then_adverb(self) -> Self
pub fn then_one_or_more_adverbs(self) -> Self
pub fn then_anything_but_adverb(self) -> Self
pub fn then_adjective(self) -> Self
pub fn then_one_or_more_adjectives(self) -> Self
pub fn then_anything_but_adjective(self) -> Self
pub fn then_apostrophe(self) -> Self
pub fn then_one_or_more_apostrophes(self) -> Self
pub fn then_anything_but_apostrophe(self) -> Self
pub fn then_hyphen(self) -> Self
pub fn then_one_or_more_hyphens(self) -> Self
pub fn then_anything_but_hyphen(self) -> Self
pub fn then_word_set(self, set: WordSet) -> Self
Sourcepub fn then_noun_phrase(self) -> Self
pub fn then_noun_phrase(self) -> Self
Add a pattern that looks for more complex ideas, like nouns with adjectives attached.
pub fn then_exact_word(self, word: &'static str) -> Self
Sourcepub fn aco(word: &'static str) -> Self
pub fn aco(word: &'static str) -> Self
Shorthand for Self::any_capitalization_of
.
pub fn any_capitalization_of(word: &'static str) -> Self
Sourcepub fn t_aco(self, word: &'static str) -> Self
pub fn t_aco(self, word: &'static str) -> Self
Shorthand for Self::then_any_capitalization_of
.
Sourcepub fn then_any_capitalization_of(self, word: &'static str) -> Self
pub fn then_any_capitalization_of(self, word: &'static str) -> Self
Match examples of word
that have any capitalization.
Sourcepub fn t_eworl(self, word: &'static str) -> Self
pub fn t_eworl(self, word: &'static str) -> Self
Shorthand for Self::then_exact_word_or_lowercase
.
pub fn then_exact_word_or_lowercase(self, word: &'static str) -> Self
pub fn then_loose(self, kind: TokenKind) -> Self
pub fn then_any_word(self) -> Self
pub fn then_strict(self, kind: TokenKind) -> Self
pub fn then_whitespace(self) -> Self
pub fn then_any_word_in(self, word_set: Lrc<HashSet<&'static str>>) -> Self
pub fn then_one_or_more(self, pat: Box<dyn Pattern>) -> Self
pub fn then(self, pat: Box<dyn Pattern>) -> Self
Trait Implementations§
Source§impl Default for SequencePattern
impl Default for SequencePattern
Source§fn default() -> SequencePattern
fn default() -> SequencePattern
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SequencePattern
impl !RefUnwindSafe for SequencePattern
impl !Send for SequencePattern
impl !Sync for SequencePattern
impl Unpin for SequencePattern
impl !UnwindSafe for SequencePattern
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more