abstract class
CrShader::Extension
- CrShader::Extension
- Reference
- Object
Overview
Abstract Extension base class. Extensions allow modular additions of custom directives, AST transformations, and validation rules without modifying core compiler files.
Defined in:
crshader/extensions/extension.crInstance Method Summary
-
#handle_directive(directive_name : String, call : Crystal::Call, parser : DslParser) : Bool
Custom top-level directives (e.g.
- #name : String
-
#transform_program(program : ShaderProgram) : Nil
AST transformation pass executed before semantic validation and code generation.
-
#validate(program : ShaderProgram, context : Validator::ValidationContext) : Nil
Custom semantic validation rules executed during Validator::SemanticValidator pass.
Instance Method Detail
Custom top-level directives (e.g. post_process, bloom_pass, pragma, debug_overlay)
Return true if the directive was handled by this extension, false otherwise.
def transform_program(program : ShaderProgram) : Nil
#
AST transformation pass executed before semantic validation and code generation.
Custom semantic validation rules executed during Validator::SemanticValidator pass.