Trait glsl_lang::parse::LangParser

source ·
pub trait LangParser: Sized {
    type Item;

    // Required methods
    fn new() -> Self;
    fn parse<L: HasLexerError + Iterator<Item = Result<(LexerPosition, Token, LexerPosition), L::Error>>>(
        &self,
        ctx: ParseContext,
        input: &mut L,
    ) -> Result<Self::Item, ParseError<LexerPosition, Token, L::Error>>;
}
Expand description

GLSL language parser

Required Associated Types§

source

type Item

AST node returned by this parser

Required Methods§

source

fn new() -> Self

Instantiate the parser

source

fn parse<L: HasLexerError + Iterator<Item = Result<(LexerPosition, Token, LexerPosition), L::Error>>>( &self, ctx: ParseContext, input: &mut L, ) -> Result<Self::Item, ParseError<LexerPosition, Token, L::Error>>

Parse the input

Object Safety§

This trait is not object safe.

Implementors§