Trait Step

Source
pub trait Step: LSend {
    // Required method
    fn step(
        &self,
        tokens: &[Token],
        cursor: usize,
        source: &[char],
    ) -> Option<isize>;
}
Expand description

An atomic step within a larger expression.

Its principle job is to identify (if any) the next position of the cursor. When cursor is moved, all tokens between the current cursor and the target position will be added to the match group.

Required Methods§

Source

fn step( &self, tokens: &[Token], cursor: usize, source: &[char], ) -> Option<isize>

Implementors§

Source§

impl Step for AnchorEnd

Source§

impl Step for AnchorStart

Source§

impl<E: Expr, S: Step> Step for UnlessStep<E, S>

Source§

impl<P> Step for P
where P: Pattern,