pub fn parse_definition_as_template(
    def: FunctionDefinition,
    declared_pointer_types: &IndexMap<SmolStr, FunctionPrototype>
) -> Result<TryTemplate>
Expand description

Try parsing a function definition as a template

Parameters

  • def: function definition to parse
  • declared_pointer_types: map of known function pointer types

Returns

A TryTemplate structure which either represents a regular function when no template parameters are present, or a template function if it will have to be instantiated into an actual GLSL function.

Errors

See crate::Error for potential template declaration errors.