Trait glsl_lang::parse::Parse[][src]

pub trait Parse: Sized {
    type Parser: LangParser;
    fn parse_with_options(
        source: &str,
        opts: &ParseContext
    ) -> Result<(Self, ParseContext), ParseError>;
fn parse_with_parser<'i>(
        source: &'i str,
        opts: &ParseContext,
        parser: &Self::Parser
    ) -> Result<(Self, ParseContext), ParseError>; fn parse(source: &str) -> Result<Self, ParseError> { ... } }

GLSL language parsing capability

Associated Types

type Parser: LangParser[src]

Type of the parser to create

Loading content...

Required methods

fn parse_with_options(
    source: &str,
    opts: &ParseContext
) -> Result<(Self, ParseContext), ParseError>
[src]

Parse the input source with the given options

fn parse_with_parser<'i>(
    source: &'i str,
    opts: &ParseContext,
    parser: &Self::Parser
) -> Result<(Self, ParseContext), ParseError>
[src]

Parse the input source with the given options and already instantiated parser

Loading content...

Provided methods

fn parse(source: &str) -> Result<Self, ParseError>[src]

Parse the input source

Loading content...

Implementors

impl Parse for TranslationUnit[src]

type Parser = TranslationUnitParser

Loading content...