pub trait ParserInput: Clone + Iterator<Item = TokenAndSpan> {
    type State: Debug;

    // Required methods
    fn start_pos(&mut self) -> BytePos;
    fn state(&mut self) -> Self::State;
    fn reset(&mut self, state: &Self::State);
    fn take_errors(&mut self) -> Vec<Error>;
    fn skip_ws(&mut self) -> Option<BytePos>;
    fn atom(&self, s: Cow<'_, str>) -> Atom;
}

Required Associated Types§

Required Methods§

source

fn start_pos(&mut self) -> BytePos

source

fn state(&mut self) -> Self::State

source

fn reset(&mut self, state: &Self::State)

source

fn take_errors(&mut self) -> Vec<Error>

source

fn skip_ws(&mut self) -> Option<BytePos>

Returns last_pos

source

fn atom(&self, s: Cow<'_, str>) -> Atom

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a> ParserInput for Input<'a>

§

type State = State

source§

impl<I> ParserInput for Lexer<'_, I>
where I: Input,