Trait glslt::transform::TransformUnit [−][src]
Represent a GLSLT transform unit
The entry point of transform units is the parse_external_declaration, which processes its input syntax as GLSLT and updates the internal state of the transform unit accordingly. The other methods are for internal operation.
Required methods
fn global_scope(&self) -> &GlobalScope
[src]
Obtain a reference to the template definition context
fn global_scope_mut(&mut self) -> &mut GlobalScope
[src]
Obtain a mutable reference to the template definition context
fn push_function_declaration(&mut self, def: FunctionDefinition)
[src]
Add a function declaration to the transform unit
Parameters
def
: syntax tree for the function definition
fn parse_external_declaration(
&mut self,
extdecl: ExternalDeclaration
) -> Result<Option<FnHandle<'_>>>
[src]
&mut self,
extdecl: ExternalDeclaration
) -> Result<Option<FnHandle<'_>>>
Parse a GLSLT declaration and add it to the transform unit
Parameters
extdecl
: top-level declaration to parse as GLSLT
Implementors
impl TransformUnit for MinUnit
[src]
fn global_scope(&self) -> &GlobalScope
[src]
fn global_scope_mut(&mut self) -> &mut GlobalScope
[src]
fn push_function_declaration(&mut self, def: FunctionDefinition)
[src]
fn parse_external_declaration(
&mut self,
extdecl: ExternalDeclaration
) -> Result<Option<FnHandle<'_>>>
[src]
&mut self,
extdecl: ExternalDeclaration
) -> Result<Option<FnHandle<'_>>>
impl TransformUnit for Unit
[src]
fn global_scope(&self) -> &GlobalScope
[src]
fn global_scope_mut(&mut self) -> &mut GlobalScope
[src]
fn push_function_declaration(&mut self, def: FunctionDefinition)
[src]
fn parse_external_declaration(
&mut self,
extdecl: ExternalDeclaration
) -> Result<Option<FnHandle<'_>>>
[src]
&mut self,
extdecl: ExternalDeclaration
) -> Result<Option<FnHandle<'_>>>