[][src]Struct turtle_syntax::lexer::Lexer

pub struct Lexer<I: Iterator<Item = Result<char>>, M: Metrics> { /* fields omitted */ }

Lexer. Transforms a char iterator into a Token iterator.

Implementations

impl<I: Iterator<Item = Result<char>>, M: Metrics> Lexer<I, M>[src]

pub fn new(input: I, metrics: M) -> Lexer<I, M>[src]

Create a new Lexer from an input char iterator.

The source_span::Metrics is used to correctly locate every token in the source text.

Trait Implementations

impl<I: Iterator<Item = Result<char>>, M: Metrics> Iterator for Lexer<I, M>[src]

type Item = Result<Loc<Token>>

The type of the elements being iterated over.

Auto Trait Implementations

impl<I, M> !RefUnwindSafe for Lexer<I, M>

impl<I, M> Send for Lexer<I, M> where
    I: Send,
    M: Send

impl<I, M> Sync for Lexer<I, M> where
    I: Sync,
    M: Sync

impl<I, M> Unpin for Lexer<I, M> where
    I: Unpin,
    M: Unpin

impl<I, M> !UnwindSafe for Lexer<I, M>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.