module CrShader::ClassLoweringPass

Overview

Lowers Crystal class and struct declarations (fields, initialize, def self.* static factories, non-mutating instance methods, and mutating inout methods) into standard shader struct declarations and tree-shakeable free helper functions across GDShader, GDShaderInc, and Vulkan GLSL 450.

Extended Modules

Defined in:

crshader/parser/class_lowering.cr

Instance Method Summary

Instance Method Detail

def fill_default_args(call_args : Array(Crystal::ASTNode), def_args : Array(Crystal::Arg)) : Array(Crystal::ASTNode) #

def fill_field_default_args(call_args : Array(Crystal::ASTNode), fields : Array(StructField)) : Array(Crystal::ASTNode) #

def run!(program : ShaderProgram) : Void #

def sanitize_method_name(class_name : String, raw_method : String) : String #