LexIt

Trait LexIt 

Source
pub trait LexIt {
    type Token<'a>;

    // Required methods
    fn new() -> Self;
    fn next<'a>(&self, lexbuf: &mut LexerState<'a>) -> Option<Self::Token<'a>>;
}
Expand description

A lexer.

Required Associated Types§

Source

type Token<'a>

The token type.

Required Methods§

Source

fn new() -> Self

Create a new lexer instance.

Source

fn next<'a>(&self, lexbuf: &mut LexerState<'a>) -> Option<Self::Token<'a>>

Get the next token from the lexer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§