Trait glsl_lang_lexer::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

Object Safety§

This trait is not object safe.

Implementors§

source§

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

§

type Input = &'i str

§

type Iter = LexerIterator<'i>

source§

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

§

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

§

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