parse_hlsl

Function parse_hlsl 

Source
pub fn parse_hlsl(src: &str) -> Result<TranslationUnit, ParseError>
Expand description

Top-level entry point: lex then parse a full HLSL source string.

Accepts either a bare statement block (no shader_body wrapper) or a full MD2 comp shader (<global decls> shader_body { ... }). Returns the translation unit AST or a ParseError at the first unrecoverable position.