abstract class CrShader::Extension

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.cr

Instance Method Summary

Instance Method Detail

def handle_directive(directive_name : String, call : Crystal::Call, parser : DslParser) : Bool #

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.


abstract def name : String #

def transform_program(program : ShaderProgram) : Nil #

AST transformation pass executed before semantic validation and code generation.


def validate(program : ShaderProgram, context : Validator::ValidationContext) : Nil #

Custom semantic validation rules executed during Validator::SemanticValidator pass.