[][src]Struct moore::lexer::StackedLexer

pub struct StackedLexer<T> { /* fields omitted */ }

A lexer chaining the tokens of multiple other lexers after another. Lexers can be pushed onto an internal stack and will then be queried for tokens until their respective Eof has been reached. At that point, the lexer is popped off the stack and the next lexer's tokens are produced. An Eof is returned once all lexers have been drained.

Implementations

impl<T> StackedLexer<T>[src]

pub fn new(eof: T) -> StackedLexer<T>[src]

pub fn push(&mut self, lexer: Box<dyn Lexer<T> + 'static, Global>)[src]

Trait Implementations

impl<T> Lexer<T> for StackedLexer<T> where
    T: Clone + PartialEq<T>, 
[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for StackedLexer<T>[src]

impl<T> !Send for StackedLexer<T>[src]

impl<T> !Sync for StackedLexer<T>[src]

impl<T> Unpin for StackedLexer<T> where
    T: Unpin
[src]

impl<T> !UnwindSafe for StackedLexer<T>[src]

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<T> Pointable for T

type Init = T

The type for initializers.

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.