[][src]Trait sana::Sana

pub trait Sana: Sized + Clone + Copy {
    const ERROR: Self;
    fn lexer(input: &str) -> Lexer<Self>

Important traits for Lexer<'input, Token>

impl<'input, Token: Sana> Iterator for Lexer<'input, Token> type Item = Spanned<Token>;
{ ... } }

Trait implemented for an enum representing all tokens.

The trait implemented by #[derive(Sana)]. You should not implement it yourself.

Associated Constants

const ERROR: Self

Loading content...

Provided methods

fn lexer(input: &str) -> Lexer<Self>

Important traits for Lexer<'input, Token>

impl<'input, Token: Sana> Iterator for Lexer<'input, Token> type Item = Spanned<Token>;

Create a new Lexer that will produce tokens of this type

Loading content...

Implementors

Loading content...