Trait luther::Lexer [] [src]

pub trait Lexer: Sized {
    type Dfa: Dfa<Self>;
    fn lexer<F, I>(
        input: I
    ) -> LexerIter<Self, F, <I as IntoIterator>::IntoIter, Self::Dfa>
    where
        I: IntoIterator<Item = StdResult<Span<char>, F>>,
        F: Fail
, { ... } }

An interface for creating a lexer for a char iterator for the type on which it is implemented.

This trait would normally be derived through the (yet to be written) luther-derive crate.

Associated Types

The deterministic finite automaton for the lexer.

Provided Methods

Important traits for LexerIter<T, F, I, D>

Creates a lexer from the supplied char iterator.

Type Parameters

  • F: the failure type for the input fallible iterator
  • I: a type convertable to a fallible iterator over Span<char>

Returns

An fallible iterator over Span<Self>.

Implementors