Trait glsl_lang::parse::Parse

source ·
pub trait Parse: HasParser {
    // Required methods
    fn parse<'i, L: LangLexer<'i>>(
        source: L::Input
    ) -> Result<Self, ParseError<<L::Iter as HasLexerError>::Error>>;
    fn parse_with_options<'i, L: LangLexer<'i>>(
        source: L::Input,
        opts: &ParseOptions
    ) -> ParseResult<L::Iter, <L::Iter as HasLexerError>::Error, Self>;
    fn parse_with_context<'i, L: LangLexer<'i>>(
        source: L::Input,
        ctx: &ParseContext
    ) -> ParseResult<L::Iter, <L::Iter as HasLexerError>::Error, Self>;
}
Expand description

GLSL language parsing functions

Required Methods§

source

fn parse<'i, L: LangLexer<'i>>( source: L::Input ) -> Result<Self, ParseError<<L::Iter as HasLexerError>::Error>>

Parse the input source

source

fn parse_with_options<'i, L: LangLexer<'i>>( source: L::Input, opts: &ParseOptions ) -> ParseResult<L::Iter, <L::Iter as HasLexerError>::Error, Self>

Parse the input source with the given options

source

fn parse_with_context<'i, L: LangLexer<'i>>( source: L::Input, ctx: &ParseContext ) -> ParseResult<L::Iter, <L::Iter as HasLexerError>::Error, Self>

Parse the input source with the given context

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: HasParser> Parse for T