pub struct SequenceExpr { /* private fields */ }
Implementations§
Source§impl SequenceExpr
impl SequenceExpr
pub fn then(self, window: impl Expr + 'static) -> Self
pub fn then_indefinite_article(self) -> Self
Sourcepub fn then_exact_word(self, word: &'static str) -> Self
pub fn then_exact_word(self, word: &'static str) -> Self
Match examples of word
case-sensitively.
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 then_any_word(self) -> Self
pub fn then_any_word(self) -> Self
Matches any word.
Sourcepub fn then_strict(self, kind: TokenKind) -> Self
pub fn then_strict(self, kind: TokenKind) -> Self
Matches any token whose Kind
exactly matches.
Sourcepub fn t_ws(self) -> Self
pub fn t_ws(self) -> Self
Shorthand for Self::then_whitespace
.
Sourcepub fn then_whitespace(self) -> Self
pub fn then_whitespace(self) -> Self
Match against one or more whitespace tokens.
pub fn then_one_or_more(self, expr: impl Expr + 'static) -> Self
Sourcepub fn if_not_then_step_one(self, condition: impl Expr + 'static) -> Self
pub fn if_not_then_step_one(self, condition: impl Expr + 'static) -> Self
Create a new condition that will step one token forward if met.
pub fn t_any(self) -> Self
pub fn then_anything(self) -> Self
pub fn then_nominal(self) -> Self
pub fn then_one_or_more_nominals(self) -> Self
pub fn then_anything_but_nominal(self) -> Self
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_possessive_nominal(self) -> Self
pub fn then_one_or_more_possessive_nominals(self) -> Self
pub fn then_anything_but_possessive_nominal(self) -> Self
pub fn then_plural_nominal(self) -> Self
pub fn then_one_or_more_plural_nominals(self) -> Self
pub fn then_anything_but_plural_nominal(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_auxiliary_verb(self) -> Self
pub fn then_one_or_more_auxiliary_verbs(self) -> Self
pub fn then_anything_but_auxiliary_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_determiner(self) -> Self
pub fn then_one_or_more_determiners(self) -> Self
pub fn then_anything_but_determiner(self) -> Self
pub fn then_proper_noun(self) -> Self
pub fn then_one_or_more_proper_nouns(self) -> Self
pub fn then_anything_but_proper_noun(self) -> Self
pub fn then_preposition(self) -> Self
pub fn then_one_or_more_prepositions(self) -> Self
pub fn then_anything_but_preposition(self) -> Self
pub fn then_not_plural_nominal(self) -> Self
pub fn then_one_or_more_not_plural_nominals(self) -> Self
pub fn then_anything_but_not_plural_nominal(self) -> Self
Trait Implementations§
Source§impl Default for SequenceExpr
impl Default for SequenceExpr
Source§fn default() -> SequenceExpr
fn default() -> SequenceExpr
Returns the “default value” for a type. Read more
Source§impl Expr for SequenceExpr
impl Expr for SequenceExpr
Auto Trait Implementations§
impl Freeze for SequenceExpr
impl !RefUnwindSafe for SequenceExpr
impl !Send for SequenceExpr
impl !Sync for SequenceExpr
impl Unpin for SequenceExpr
impl !UnwindSafe for SequenceExpr
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<E> ExprExt for E
impl<E> ExprExt for E
Source§fn iter_matches<'a>(
&'a self,
tokens: &'a [Token],
source: &'a [char],
) -> Box<dyn Iterator<Item = Span> + 'a>
fn iter_matches<'a>( &'a self, tokens: &'a [Token], source: &'a [char], ) -> Box<dyn Iterator<Item = Span> + 'a>
Iterate over all matches of this expression in the document, automatically filtering out
overlapping matches, preferring the first.
fn iter_matches_in_doc<'a>( &'a self, doc: &'a Document, ) -> Box<dyn Iterator<Item = Span> + 'a>
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