Package io.github.douira.glsl_transformer.transform
package io.github.douira.glsl_transformer.transform
-
ClassDescriptionThe dynamic parse tree walker can with structural modification of a node's child array.The move checkable interface provides a method for checking if the implementing node replaces a given node.The phase collector holds the registered transformations and manages their execution.This class was taken from here and was added to the public domain by the author DaveJarvis Instances of this class allows multiple listeners to receive events while walking the parse tree.A run phase simply executes one method when it is executed in a level by the phase collector.The semantic exception should be thrown by a transformation phase when the parsed code has semantic errors or there is some other content-related reason why the transformation process should be halted.The transformation is the vehicle through which transformation phases, which do all the actual transforming work, are added to the phase collector.The record used to store added transformation phases with their order and group index.Implements the phase collector by providing the boilerplate code for setting up an input, a lexer and a parser.The transformations phase actually does a specific transformation.Shader code is expected to be roughly structured as follows: version, extensions, other directives (#define, #pragma etc.), declarations (layout etc.), functions (void main etc.).The walk phase is a phase on which the listener methods of the generated listener interface are called.