Trait LangLexer

Source
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

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§

Source§

impl<'i> LangLexer<'i> for glsl_lang_lexer::full::str::Lexer<'i>

Source§

impl<'i> LangLexer<'i> for glsl_lang_lexer::min::str::Lexer<'i>

Source§

impl<'r, 'p, F: FileSystem> LangLexer<'p> for glsl_lang_lexer::full::fs::Lexer<'r, 'p, F>
where File<'r, 'p, F>: 'p,

Source§

type Input = File<'r, 'p, F>

Source§

type Iter = LexerIterator<'r, 'p, F>