swc_css_parser::parser::input

Trait ParserInput

source
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 ParserInput for Input<'_>

source§

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