pub trait LangLexer<'i>: HasLexerError + Sized {
    type Input: 'i;
    type Iter: LangLexerIterator + HasLexerError<Error = Self::Error>;

    // Required methods
    fn new(source: Self::Input, opts: &ParseOptions) -> Self;
    fn run(self, ctx: ParseContext) -> Self::Iter;
}
Expand description

GLSL language lexer

Required Associated Types§

source

type Input: 'i

Type of the input for this lexer

source

type Iter: LangLexerIterator + HasLexerError<Error = Self::Error>

Type of the iterator returned by this lexer

Required Methods§

source

fn new(source: Self::Input, opts: &ParseOptions) -> Self

Instantiate the lexer

Parameters
  • source: input for the lexer
  • opts: parsing options
source

fn run(self, ctx: ParseContext) -> Self::Iter

Run the lexer

Object Safety§

This trait is not object safe.

Implementors§